未初始化的常量Scrubyt :: Navigation :: Mechanize :: WWW(NameError)

时间:2011-09-07 12:29:22

标签: ruby-on-rails ruby mechanize scrubyt

我正在使用Scrubyt gem,当我使用它时,我收到此错误:

/home/bitnami/.rvm/gems/ruby-1.8.7-p352/gems/scrubyt-0.4.06/lib/scrubyt/core/navigation/agents/mechanize.rb:17:in `included': uninitialized constant Scrubyt::Navigation::Mechanize::WWW (NameError)

我安装了以下宝石

*** LOCAL GEMS ***

builder (3.0.0)
commonwatir (2.0.1)
firewatir (1.9.3)
hoe (2.12.2)
hpricot (0.8.4)
mechanize (2.0.1)
net-http-digest_auth (1.1.1)
net-http-persistent (1.9)
nokogiri (1.5.0)
rake (0.9.2)
s4t-utils (1.0.4)
scrubyt (0.4.06)
user-choices (1.1.6.1)
webrobots (0.0.11)
xml-simple (1.1.0)

知道这里有什么不对吗?

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题。我解决了这个问题,安装了hpricotMechanize

的确切版本
sudo gem install hpricot -v 0.5
sudo gem install mechanize -v 0.6.3

然后

sudo gem install scrubyt

但首先我用

卸载了以前的gem版本
sudo gem uninstall hpricot
sudo gem uninstall mechanize