RubyMine doesn't find Chromedriver, while it's definitely installed (using Homebrew)

Hello everybody

After years of happy TextMateing, I finally made the step to give RubyMine a chance, as my coworkers use it heavily.

Sadly, I already ran into the problem, that RubyMine doesn't find my chromedriver which I need for capybara tests. Here's the log:

/Users/josh/.rvm/rubies/ruby-1.9.3-p0/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/josh/.rvm/gems/ruby-1.9.3-p0/bin/rspec /Users/josh/Documents/Work/Sientia/iq/spec/requests/email_connection/email_connection_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter --example "Email connection Show email connection status Valid email account connects successfully"
Testing started at 11:58 AM ...


Selenium::WebDriver::Error::WebDriverError: Unable to find the chromedriver executable. Please download the server from http://code.google.com/p/chromedriver/downloads/list and place it somewhere on your PATH. More info at http://code.google.com/p/selenium/wiki/ChromeDriver.
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/chrome/service.rb:20:in `executable_path'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/chrome/service.rb:33:in `default_service'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/chrome/bridge.rb:14:in `initialize'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/common/driver.rb:37:in `new'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/common/driver.rb:37:in `for'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver.rb:65:in `for'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/capybara-1.1.3/lib/capybara/selenium/driver.rb:15:in `browser'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/capybara-1.1.3/lib/capybara/selenium/driver.rb:36:in `visit'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/capybara-1.1.3/lib/capybara/session.rb:157:in `visit'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/capybara-1.1.3/lib/capybara/dsl.rb:161:in `visit'
/Users/josh/Documents/Work/Sientia/iq/spec/requests/email_connection/email_connection_spec.rb:14:in `block (4 levels) in <top (required)>'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:113:in `instance_eval'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:113:in `block in run'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:253:in `with_around_each_hooks'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:110:in `run'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:378:in `block in run_examples'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:374:in `map'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:374:in `run_examples'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:360:in `run'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `block in run'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `map'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `run'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `block in run'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `map'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:361:in `run'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `map'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in `block in run'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/reporter.rb:34:in `report'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:25:in `run'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:in `run'
/Users/josh/.rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun'


1 example, 1 failure, 0 passed


Finished in 4.912977 seconds
Coverage report generated for RSpec to /Users/josh/Documents/Work/Sientia/iq/coverage. 1040 / 1615 LOC (64.4%) covered.


Process finished with exit code 1


Maybe anyone can give me a hint? I already reinstalled chromedriver and restarted RubyMine.

Thank you.
12 comments
Comment actions Permalink

I also tried adding "/usr/local/bin" to the Project Structure > Load Path (where chromedriver is installed), but again no success...

0
Comment actions Permalink

I've run into the same problem, and haven't had any success solving it...

0
Comment actions Permalink

We have switched to Capybara-webkit, so it's not a big issue anymore for me.

But I'm quite bewildered why nobody of the customer service seems to take care about this issue... I have paid quite some money for this application...!

0
Comment actions Permalink
But I'm quite bewildered why nobody of the customer service seems to take care about this issue... I have paid quite some money for this application...!

It's a forum -- devs can read your post, do not have concrete answer, leave it for later .. and may forget about it (may happen with any of us).

You are paid customer, right? You can contact support directly by email (support@jetbrains.com) -- they are fast at replying, and because it works differently to the forum, your case will be registered & tracked until resolved/closed.

0
Comment actions Permalink

Thank you for this useful information, I will contact customer support directly.          

0
Comment actions Permalink

Sorry, looks like I missed original question. This is most likely caused by Mac OS X environment variables handling. You can read more about configuring env. variables here, or try using latest EAP, it includes homebrew bin path by default.

0
Comment actions Permalink

Thanks, Dennis. I already stumbled over http://devnet.jetbrains.net/docs/DOC-1160, but I didn't really get it back then.

If you say that this will be no problem anymore in a future version, then I'll wait for that version (we're not using Chromedriver at the time being).     

0
Comment actions Permalink

Setting the path in environment.plist fixed it for me. Thanks!

0
Comment actions Permalink

What did you specify exactly in your environment.plist? I created the folder ~/.MacOSX and file environment.plist, but when opening it with XCode, the app tells me that the file is corrupted.

0
Comment actions Permalink

I used the RCEnvironment pref pane from http://www.rubicode.com/Software/RCEnvironment/ to add the PATH (/usr/local/bin in my case). I didn't do it "manually"

-- Andy

0
Comment actions Permalink

I've got this same problem, trying to get Chromedriver to work with my cucumber BDD/watir-webdriver setup.  
1) running Cucumber from rubymine and command line works fine with Firefox;
2) using Chromedriver, running Cucumber from rubymine or commandline does not work
3) using chromedriver from IRB or using terminal to run chromedriver spike ruby files works

Here's the setup I have:
Mac OSX: 10.9.5

chromedriver location:

$ which chromedriver

/usr/local/bin/chromedriver
$ ls -lart /usr/local/bin/chromedriver

lrwxr-xr-x  1 user  admin  44 Dec 11 18:08 /usr/local/bin/chromedriver -> ../Cellar/chromedriver/2.12/bin/chromedriver

$

Here's my env.rb entries for chrome and firefox (firefox works):

 
case ENV['BROWSER']
 
  when 'chrome'
    browser = Watir::Browser.new :chrome
  when 'firefox'
    browser = Watir::Browser.new :firefox

end

Error from running Rubymine:
Unable to find the chromedriver executable. Please download the server from http://chromedriver.storage.googleapis.com/index.html and place it somewhere on your PATH. More info at http://code.google.com/p/selenium/wiki/ChromeDriver. (Selenium::WebDriver::Error::WebDriverError)
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/chrome/service.rb:20:in `executable_path'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/chrome/service.rb:31:in `default_service'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/chrome/bridge.rb:14:in `initialize'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/common/driver.rb:37:in `new'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/common/driver.rb:37:in `for'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver.rb:67:in `for'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/watir-webdriver-0.6.11/lib/watir-webdriver/browser.rb:46:in `initialize'
/Users/user/Projects/new_nuvotv_automation/features/support/env.rb:57:in `new'
/Users/user/Projects/new_nuvotv_automation/features/support/env.rb:57:in `<top (required)>'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/cucumber-1.3.17/lib/cucumber/rb_support/rb_language.rb:95:in `load'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/cucumber-1.3.17/lib/cucumber/rb_support/rb_language.rb:95:in `load_code_file'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/cucumber-1.3.17/lib/cucumber/runtime/support_code.rb:180:in `load_file'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/cucumber-1.3.17/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/cucumber-1.3.17/lib/cucumber/runtime/support_code.rb:82:in `each'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/cucumber-1.3.17/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/cucumber-1.3.17/lib/cucumber/runtime.rb:184:in `load_step_definitions'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/cucumber-1.3.17/lib/cucumber/runtime.rb:42:in `run!'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/cucumber-1.3.17/lib/cucumber/cli/main.rb:47:in `execute!'
/Users/user/.rvm/gems/ruby-2.0.0-p481/gems/cucumber-1.3.17/bin/cucumber:13:in `<top (required)>'
/Users/user/.rvm/gems/ruby-2.0.0-p481/bin/cucumber:23:in `load'
/Users/user/.rvm/gems/ruby-2.0.0-p481/bin/cucumber:23:in `<top (required)>'
-e:1:in `load'
-e:1:in `<main>'

Process finished with exit code 1



I've also done the following:
1) I added the chromedriver binary to a directory in the Rubymine project, then added the path to the binary, to the LOAD PATH; didn't fix the issue
2) added the chromedriver path to the env.rb by adding the following:
  
  Selenium::WebDriver::Chrome.path = '/usr/local/bin/chromedriver'


This also didn't work, with exactly the same error above.

Someone have chromedriver working please help, thanks!

0
Comment actions Permalink

Nuvomanny wrote:

I've got this same problem, trying to get Chromedriver to work with my cucumber BDD/watir-webdriver setup.  
1) running Cucumber from rubymine and command line works fine with Firefox;
2) using Chromedriver, running Cucumber from rubymine or commandline does not work

If Cucumber is unable to find the driver when it is running from command line then I'd suggest to ask Cucumber users how to fix this.

Regards, Oleg.

0

Please sign in to leave a comment.