Rails:Selenium :: WebDriver :: Error :: WebDriverError:无法执行:'chromedriver-helper' [英] Rails: Selenium::WebDriver::Error::WebDriverError: not executable: 'chromedriver-helper'

查看:122
本文介绍了Rails:Selenium :: WebDriver :: Error :: WebDriverError:无法执行:'chromedriver-helper'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两天前我已经设置了Rails环境,我认为一切都很好,但是当我运行rake test命令时,由于此加载错误,它被中止了:

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"

我尝试了几件事,但没有任何效果.我重新安装了gem并对其进行了更新.然后,我尝试安装它的旧版本.我也尝试添加 gem "selenium-webdriver"gem "chromedriver-helper"Gemfile

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

和在spec_helper.rb中:

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

github 所述,但不确定下一步该怎么做.

as mentioned on github but not sure what should I try next.

有人可以帮我吗?谢谢.

Could someone help me with this, please? Thank you.

推荐答案

之前,与正在使用Windows笔记本电脑工作的同事遇到了此问题. 在Github上研究并发现此线程: https://github.com/flavorjones/chromedriver-helper/issues/19

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

这并不是真正的解决方法,而只是该线程中一位参与者建议的解决方法.我们所做的更改已在您的Gemfile中从gem 'chromedriver-helper', '~> 2.1.0'更改为gem 'chromedriver-helper', '1.2.0'.

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.

步骤:

  1. 删除Gemlock文件.

  1. Delete Gemlock file.

更改Gemfile中的chromedriver-helper版本.

Change chromedriver-helper version in your Gemfile.

这对我们有效.

这篇关于Rails:Selenium :: WebDriver :: Error :: WebDriverError:无法执行:'chromedriver-helper'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆