如何解决依赖性错误=> Net不会丢失常量HTTPResponse

时间:2011-12-21 21:56:11

标签: ruby-on-rails rubygems bundler

我做了一个禁忌:我盲目地做了bundle update而没有保存我以前的配置。现在,当我调用Mechanize的get()时,我从activesupport收到以下错误消息。我已经包含了回溯,以明确涉及哪些版本。

我是否以某种方式搞砸了依赖关系?解决这个问题的最佳方法是什么?

ArgumentError: Net is not missing constant HTTPResponse!
from /sandbox/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:479:in `load_missing_constant'
from /sandbox/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:183:in `block in const_missing'
from /sandbox/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:181:in `each'
from /sandbox/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:181:in `const_missing'
from /sandbox/usr/lib/ruby/gems/1.9.1/gems/net-http-persistent-2.3.2/lib/net/http/persistent/ssl_reuse.rb:66:in `connect'
from /sandbox/usr/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
from /sandbox/usr/lib/ruby/1.9.1/net/http.rb:632:in `start'
from /sandbox/usr/lib/ruby/gems/1.9.1/gems/net-http-persistent-2.3.2/lib/net/http/persistent.rb:582:in `reset'
from /sandbox/usr/lib/ruby/gems/1.9.1/gems/net-http-persistent-2.3.2/lib/net/http/persistent.rb:397:in `connection_for'
from /sandbox/usr/lib/ruby/gems/1.9.1/gems/net-http-persistent-2.3.2/lib/net/http/persistent.rb:616:in `request'
from /sandbox/usr/lib/ruby/gems/1.9.1/gems/mechanize-2.1/lib/mechanize/http/agent.rb:264:in `fetch'
from /sandbox/usr/lib/ruby/gems/1.9.1/gems/mechanize-2.1/lib/mechanize.rb:319:in `get'

1 个答案:

答案 0 :(得分:0)

解决。这是由于@drbrain快速修复的Mechanize中的一个短暂错误。他的回答是:

  

升级到net-http-persistent 2.3.3,有一个bug。请参阅drbrain / net-http-persistent @ 3fadf4a以获取修复。)