打开bundle exec rails console时在ruby中的LoadError

时间:2013-10-31 16:55:00

标签: ruby-on-rails ruby

我遇到一个问题,当我输入“br c”(运行bundle exec c的捷径)时,它给了我下面的错误。

ependencies.rb:251:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
    from /Users/johnhenry/valcuqw/vendor/bundle/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `block in require'
    from /Users/johnhenry/valcuqw/vendor/bundle/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /Users/johnhenry/valcuqw/vendor/bundle/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `require'
    from /Users/johnhenry/valcuqw/vendor/bundle/gems/nokogiri-1.5.6/lib/nokogiri.rb:27:in `<top (required)>'
    from /Users/johnhenry/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
    from /Users/johnhenry/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from /Users/johnhenry/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
    from /Users/johnhenry/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
    from /Users/johnhenry/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
    from /Users/johnhenry/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
    from /Users/johnhenry/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
    from /Users/johnhenry/valcuqw/config/application.rb:7:in `<top (required)>'
    from /Users/johnhenry/valcuqw/vendor/bundle/gems/railties-3.2.14/lib/rails/commands.rb:39:in `require'
    from /Users/johnhenry/valcuqw/vendor/bundle/gems/railties-3.2.14/lib/rails/commands.rb:39:in `<top (required)>'
    from script/rails:14:in `require'
    from script/rails:14:in `<main>'

有人可以帮我解决这个问题吗?

1 个答案:

答案 0 :(得分:1)

看起来你的应用需要nokogiri,但你没有把nokogiri放在Gemfile中。