【问题标题】:how do I resolve dependency error => Net is not missing constant HTTPResponse如何解决依赖错误 => 网络不缺少常量 HTTPResponse
【发布时间】: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


【解决方案1】:

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

升级到 net-http-persistent 2.3.3,有一个错误。有关修复,请参见 drbrain/net-http-persistent@3fadf4a。)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-07-08
    • 2021-06-24
    • 2021-11-14
    • 2020-03-27
    • 2012-08-05
    • 2021-05-03
    • 2013-04-29
    • 2016-06-01
    相关资源
    最近更新 更多