在 Windows 上使用 Scrubyt 和 Ruby 1.9.2,调用 Scrubyt::Extractor.define 时出现以下错误
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:479:in load_missing_constant': Scrubyt::Navigation is not missing constant Mechanize! (ArgumentError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:183:inblock in const_missing'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:inconst_missing'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/navigation/agents/mechanize.rb:17:in block in included'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/navigation/agents/mechanize.rb:16:inmodule_eval'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/navigation/agents/mechanize.rb:16:in included'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/shared/extractor.rb:29:ininclude'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/shared/extractor.rb:29:in block in define'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/shared/extractor.rb:28:inclass_eval'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/scrubyt-0.4.31/lib/scrubyt/core/shared/extractor.rb:28:in `define'
@@agent = Mechanize::Mechanize.new
尽管在文件“require 'mechanize'”中指定了 Mechanize,但它似乎与在 scrubyt/core/navigation/agents/mechanize.rb 中未加载有关
我安装了 mechanize (2.0.1)、hpricot (0.8.4)、fireawtir (1.9.3) 和 nokogiri (1.5.0)
关于为什么这个问题的任何想法?