We recently were working on a project where the version of Firefox on the development machines was causing acceptance tests running on Capybara and Selenium to fail and/or hang erroneously. The solution was to point Selenium at a custom version of Firefox. We also added the Firefox binaries to the application git repo so that all devs could run against a known good version of Firefox.
-
Download the desired version of Firefox from ftp://ftp.mozilla.org/pub/firefox/releases/
-
Put Firefox.app in your rails app somewhere like ./bin/spec/macosx/
-
Add an intializer called selenium.rb to config/initalizers and put in the following code (customized to where you put Firefox)
if Rails.env.test?
require 'selenium-webdriver'
Selenium::WebDriver::Firefox::Binary.path= Rails.root.to_s + '/bin/spec/macosx/Firefox.app/Contents/MacOS/firefox-bin'
end