需要'watir-webdriver'错误 [英] require 'watir-webdriver' error
本文介绍了需要'watir-webdriver'错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在Rails中使用Watir,并安装它,当我使用irb时,它工作正常。但是,当我尝试将它包含在Rails应用程序中时,作为
require'rubygems'
require'watir-webdriver'
我得到以下错误:
LoadError(无需加载此文件 - watir-webdriver)
有些人遇到了同样的问题,这是通过使用require'rubygems'解决的,但在我的情况下,问题仍然存在。任何想法?
解决方案
$是否将Gem'watir-webdriver'添加到Rails根文件夹中的Gemfile中? b $ b
I am trying to use Watir with Rails, and installed it, and when I use it from irb, it works fine. But when I try to include it in rails application, as
require 'rubygems'
require 'watir-webdriver'
I get the following error:
LoadError (no such file to load -- watir-webdriver)
Some people had experienced the same problem, which was solved by using require 'rubygems', butin my case, the problem still persists. Any idea?
解决方案
Did you add gem 'watir-webdriver' to your Gemfile in Rails root folder?
这篇关于需要'watir-webdriver'错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文