Nokogiri在我的宝石文件中。 Bundle install返回预期的输出:
Using nokogiri (1.4.4)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
尝试执行db:create:all时出现以下错误:
rake db:create:all
Could not find nokogiri-1.4.4 in any of the sources
如果我在irb中测试,我也会得到预期的输出。
irb(main):003:0> require "rubygems"
=> true
irb(main):004:0> require "nokogiri"
=> true
我已经多次卸载并安装了nokogiri及其依赖项。
我正在使用:
Rails 3.0.6 Ruby 1.8.7
非常感谢任何帮助。
编辑:美国东部夏令时间4/25/11 3:02
以下评论:nokogiri的Gemfile行是
gem "nokogiri", '1.4.4', :require => "nokogiri"
答案 0 :(得分:2)
我考虑到你的案子进行了测试 我的Gemfile是这样的:
gem "nokogiri", '1.4.4', :require => "nokogiri"
然后rake db:migrate
工作得很好
答案 1 :(得分:1)
这可能是一个很长的镜头,但你可以尝试:
bundle install --no-deployment
如果您处于部署模式,Rails将在供应商目录中查找您的宝石,而不是通常的安装位置。它可能会导致这种错误。