Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)

Getting the following error when running rspec tests

unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) in rails

Using latest ruby (1.9.2) and firefox (6.0)

Using rspec-rails, capybara and several other gems, but they don't seem to be a problem. These tests run fine in another environment (linux).

like image 511
Srini K Avatar asked Aug 31 '11 21:08

Srini K


2 Answers

[Update - this can (was for me) still be a fix for this issue in 2015 |mdurrant|]

I came across this problem lately.

You should upgrade to capybara v1.0.1 to have a correct selenium webdriver.

To be sure I added:

gem 'selenium-webdriver', '2.25.0' 

in my Gemfile.

Important note:
The selenium-webdriver gem is updated, and a new version released, for every subsequent version of Firefox. Presently, version 2.25.0 is needed to support Firefox 15.

like image 141
apneadiving Avatar answered Oct 30 '22 21:10

apneadiving


I couldn't get it to work with Firefox 10 on Ubuntu. Switching to Chrome helped.

Install Chrome Driver.

spec_helper.rb:

Capybara.register_driver :selenium_chrome do |app|      Capybara::Selenium::Driver.new(app, :browser => :chrome) end 

In your spec:

Capybara.current_driver = :selenium_chrome ... tests ... Capybara.use_default_driver 
like image 20
Vincent Avatar answered Oct 30 '22 20:10

Vincent