升级到rails 3,并使用Bundler作为gem,在一个混合平台开发组中。 我在Windows上。 当我运行捆绑安装它成功完成,但不会安装hpricot。 该hpricot行是:
gem "hpricot", "0.8.3", :platform => :mswin
也试过了
gem "hpricot", :platform => :mswin
这两个完整的罚款,但当我试图做一个“捆绑显示hpricot”我得到:
Could not find gem 'hpricot' in the current bundle.
如果我运行rails控制台并尝试“require'hpricot'”,我会得到:
LoadError: no such file to load -- hpricot
我也手动安装了hpricot,仍然得到上述错误。 这在移动到rails 3之前工作得很好。
试试这个在控制台,然后做捆绑安装,它将工作:
gem install hpricot --platform=mswin32
这可能是因为你正在使用MinGW构建的ruby版本,在这种情况下,你的平台将是'mingw'而不是'mswin'。 尝试将您的Gemfile行更改为以下内容:
gem "hpricot", "0.8.3", :platform => :mingw
如果您有其他开发人员正在使用当前的设置,并且不想为他们打破它,请将其更改为:
gem "hpricot", "0.8.3", :platforms => [:mswin, :mingw]