0

尝试运行时rails g rails_admin:install出现以下错误:

/home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/lib/nokogiri.rb:28:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/lib/nokogiri.rb:28:in `<top (required)>'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rack-pjax-0.7.0/lib/rack/pjax.rb:1:in `require'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rack-pjax-0.7.0/lib/rack/pjax.rb:1:in `<top (required)>'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rack-pjax-0.7.0/lib/rack-pjax.rb:2:in `require'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rack-pjax-0.7.0/lib/rack-pjax.rb:2:in `<top (required)>'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rails_admin-0.5.0/lib/rails_admin/engine.rb:7:in `require'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rails_admin-0.5.0/lib/rails_admin/engine.rb:7:in `<top (required)>'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rails_admin-0.5.0/lib/rails_admin.rb:1:in `require'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rails_admin-0.5.0/lib/rails_admin.rb:1:in `<top (required)>'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
  from /home/vieirater/website/config/application.rb:7:in `<top (required)>'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:44:in `require'
  from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:44:in `<top (required)>'
  from bin/rails:4:in `require'
  from bin/rails:4:in `<main>'
4

1 回答 1

1

你可以尝试运行

rvm ruby-2.0.0-p247 gem update --system

此博客文章中有关同一问题的更多详细信息。

于 2013-10-21T09:57:52.363 回答