问题
I've setup Rails environment two days ago and I thought things were going fine but then when I ran rake test
command it got aborted due to this load error:
Bundler::GemRequireError: There was an error while trying to load the gem 'chromedriver-helper'`
`Caused by: Selenium::WebDriver::Error::WebDriverError: not executable: "C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/chromedriver-helper-2.1.0/bin/chromedriver-helper"
I tried a few things but nothing worked. I reinstalled the gem and updated it. Then I tried to install an older version of it. I also tried to add
gem "selenium-webdriver"
and gem "chromedriver-helper"
to the Gemfile
and in spec_helper.rb
this:
Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(app, browser: :chrome)
end
as mentioned on github but not sure what should I try next.
Could someone help me with this, please? Thank you.
回答1:
Encountered this issue earlier with a colleague who is working on a Windows laptop. Researched and found this thread at Github: https://github.com/flavorjones/chromedriver-helper/issues/19
This is not really a fix but is just a work around suggested by one of the participants on the thread. What we did was changed gem 'chromedriver-helper', '~> 2.1.0'
to gem 'chromedriver-helper', '1.2.0'
in your Gemfile.
Steps:
Delete Gemlock file.
Change chromedriver-helper version in your Gemfile.
- Run
bundle install
, so the change could take effect. - Run the tests again.
This worked on our end.
来源:https://stackoverflow.com/questions/52630480/rails-seleniumwebdrivererrorwebdrivererror-not-executable-chromedriver