【发布时间】:2011-12-21 21:56:11
【问题描述】:
我拒绝了:我盲目地做了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'
【问题讨论】:
-
FWIW,我意识到我确实有 Gemfile.lock 的存档副本——我不知道这是否能帮助我摆脱困境。
标签: ruby-on-rails rubygems bundler