public
Created

Rails On Fire Error

  • Download Gist
gistfile1.txt
1 2 3 4 5
1) Selenium Tests The logging in process signs in a valid user
Failure/Error: visit '/users/sign_in'
Selenium::WebDriver::Error::WebDriverError:
Could not find Firefox binary (os=linux). Make sure Firefox is installed or set the path manually with Selenium::WebDriver::Firefox::Binary.path=
# ./spec/integration/log_spec.rb:26:in `block (3 levels) in <top (required)>'

Ok here is what I did:

Gemfile:
gem "capybara"
gem 'capybara-webkit'

Remove Selenium gem from your Gemfile

in your capybara.rb:
Capybara.javascript_driver = :webkit

Do not set Capybara.default_driver

Works like a charm and the tests now take 35 instead of 85 seconds.

Is there some check I can make in my test file to detect I am running
RailsOnFire then
I can change my config if I need.

B

On Fri, Jun 17, 2011 at 12:10 PM, flomotlik <
reply@reply.github.com>wrote:

Ok here is what I did:

Gemfile:
gem "capybara"
gem 'capybara-webkit'

Remove Selenium gem from your Gemfile

in your capybara.rb:
Capybara.javascript_driver = :webkit

Do not set Capybara.default_driver

Works like a charm and the tests now take 35 instead of 85 seconds.

Reply to this email directly or view it on GitHub:
https://gist.github.com/1031029

The simplest way I think is in your test commands to export a variable. e.g. add
export RAILSONFIRE=TRUE
before you execute rspec

and in your code you can do
Capybara.javascript_driver = :webkit if ENV["RAILSONFIRE"]

Is there any special feature you need Selenium for? Would be very interrested as we might have to implement Selenium support then. But I would give capybara-webkit a serious try. It's fast and uses the same engine as chrome does.

On Fri, Jun 17, 2011 at 2:21 PM, flomotlik <
reply@reply.github.com>wrote:

The simplest way I think is in your test commands to export a variable.
e.g. add
export RAILSONFIRE=TRUE
before you execute rspec

Took me 10s for my brain to understand. I get it. Perfect! Thanks

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.