I am looking for RoR Webrat Selenium Install Recipe

For what it's worth, I follow the recipe in the Beta version of The RSpec Book available from http://www.pragprog.com/ as well as watching the cucumber railscasts at railscasts.com. These are great sources of info for configuring and using this stack.

I'm running (ubuntu 9.04):

Ruby version 1.8.7 (i686-linux) RubyGems version 1.3.5 Rack version 1.0 Rails version 2.3.4 Active Record version 2.3.4 Active Resource version 2.3.4 Action Mailer version 2.3.4 Active Support version 2.3.4 Application root /srv/www/lcre Environment development Database adapter mysql

[ ['rspec', false, '>=1.2.9'], ['rspec-rails', false, '>=1.2.9'], ['thoughtbot-factory_girl', 'factory_girl', '>=1.2.2'], ['cucumber', false, '>=0.4.3'], ['pickle', false, '>=0.1.22'], ['webrat', false, '>=0.5.3'], ['Selenium', false, '>=1.1.14'], ['selenium-client', false, '>=1.2.17'], ['rcov', false, '>=0.9.6'], ['mongrel', false, '>=1.1.5'], ['launchy', false, '>=0.3.3'], ].each do | gem, lib, version |   unless File.directory?(File.join(Rails.root, 'vendor/plugins/# {gem}'))     config.gem gem, :lib => lib, :version => version   end end

with all of the gems actually being at the version specified (as opposed to something higher).

env.rb (it's a bit of a hack right now as I'm playing around trying to debug a problem in which Webrat can't find its 'within' method when running in selenium mode):

require 'rubygems' # Sets up the Rails environment for Cucumber ENV["RAILS_ENV"] ||= "test" require File.expand_path(File.dirname(__FILE__) + '/../../config/ environment') require 'cucumber/rails/world'

# If you set this to true, each scenario will run in a database transaction. # You can still turn off transactions on a per-scenario basis, simply tagging # a feature or scenario with the @no-txn tag.

I would suggest, a few things... 1. Updating webrat, selenium-client to the most recent versions and cucumber to at least 0.4.2. Don't forget to run script/generate cucumber after you update the cucumber gem. 2. Also you do not need the selenium gem as selenium server comes prepackaged with webrat, in its vendor folder. 3. After you're up and running using those gems its a good idea to separate your features or scenarios into two different profiles, plain and enhanced for your rails and selenium modes respectively. A good how to for this is on Aslak Hellesoy's cucumber github wiki page for selenium. http://wiki.github.com/aslakhellesoy/cucumber/setting-up-selenium . Please note the update at the top of the page.

I've found that not all versions of webrat work with all versions of cucumber but the most recent of both gems work well for me. Btw, I'm running: Selenium-client 1.2.17 Cucumber 0.4.2 Webrat 0.5.3 Dbcleaner 0.2.3 Rails 2.3.2 Ruby 1.8.6 pl 287

If all else fails I would try the webrat list: webrat@googlegroups.com.