5

In irb I do the following:

require "watir"
b = Watir::Browser.new :chrome

I then get the following error:

Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver 127.0.0.1:9515

OSX 10.12.3 Ruby 2.3.1 Chrome Driver latest version Watir 6.2.0

Flip
  • 6,233
  • 7
  • 46
  • 75
Glen
  • 144
  • 1
  • 1
  • 7
  • 1
    you need to download the driver, see http://stackoverflow.com/questions/27719345/how-to-specify-the-location-of-the-chromedriver-binary – max pleaner Mar 03 '17 at 07:25
  • 2
    you can `gem install webdrivers` and it will automatically keep your system up to date with the latest version of any driver being used – titusfortner Mar 03 '17 at 17:49
  • We had to hand over the path to the chromedriver bin when using it on heroku. See my detailed answer here https://stackoverflow.com/a/50781946/135160 – anka Jun 10 '18 at 08:42

2 Answers2

10
gem install webdrivers

Worked for me.

Difster
  • 3,264
  • 2
  • 22
  • 32
Amin Shamim
  • 111
  • 1
  • 4
0

Solved in a minute!

  • Download geckodriver from here
  • Extract the tar.gz file into your application root folder
  • Give this command in terminal from application root path export PATH=$PATH:/path/to/application