While using Watir Webdriver v0.9.1 for rails (along with Selenium Webdriver 2.53.1), Firefox was opening when
browser = Watir::Browser.new :firefox
was called. Now however, it fails on that line with
unable to bind to locking port 7054 within 45 seconds
@ /Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/common/socket_lock.rb:59:in `lock'
/Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/common/socket_lock.rb:40:in `locked'
/Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/firefox/launcher.rb:51:in `launch'
/Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/firefox/bridge.rb:43:in `initialize'
/Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/common/driver.rb:53:in `new'
/Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/common/driver.rb:53:in `for'
/Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver.rb:84:in `for'
/Users/andmcadams/.rvm/gems/ruby-2.0.0-p648/gems/watir-webdriver-0.9.1/lib/watir-webdriver/browser.rb:46:in `initialize'
test/integration/like_fanpage_task_test.rb:40:in `new'
test/integration/like_fanpage_task_test.rb:40:in `block (2 levels) in <class:LikeFanpageTaskTest>'
It seemed to do so randomly, as I did not change the code from its working form and that line is the first line called. I have Firefox 37.0.2, which worked earlier. I have tried restarting my computer, killing processes related to ruby and Firefox and starting them again, and reinstalling Firefox but to no avail.
ps aux | grep firefox
command. If you see other firefox instances then kill them or reboot comp. – Maximsudo kill -9 PID
it still shows up when usingps aux | grep firefox
but with a PID two greater than the last time and Watir still won't open Firefox. – andmcadamswatir-webdriver-0.6.2
Lots have changes have been made since then. – titusfortnerport += 1 until free? port
. Set $DEBUG = true and add a gist with your stdout. – titusfortner