在Ruby on Rails中启动服务器时,我收到此错误。我现在该怎么办?
C:\Ruby22\dev\demo>rails server
C:/Ruby22/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.4-x86-mingw32/lib/nokogiri.rb:
29:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.4-x86-mingw32/lib
/nokogiri.rb:29:in `rescue in <top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.4-x86-mingw32/lib
/nokogiri.rb:25:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/loofah-2.0.3/lib/loofah.rb:3:in
`require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/loofah-2.0.3/lib/loofah.rb:3:in
`<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/lib/r
ails-html-sanitizer.rb:2:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rails-html-sanitizer-1.0.2/lib/r
ails-html-sanitizer.rb:2:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers/sanitize_helper.rb:3:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers/sanitize_helper.rb:3:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers/text_helper.rb:32:in `<module:TextHelper>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers/text_helper.rb:29:in `<module:Helpers>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers/text_helper.rb:6:in `<module:ActionView>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers/text_helper.rb:4:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers/form_tag_helper.rb:18:in `<module:FormTagHelper>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers/form_tag_helper.rb:14:in `<module:Helpers>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers/form_tag_helper.rb:8:in `<module:ActionView>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers/form_tag_helper.rb:6:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers/form_helper.rb:4:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers/form_helper.rb:4:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers.rb:50:in `<module:Helpers>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers.rb:4:in `<module:ActionView>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/actionview-4.2.5/lib/action_view
/helpers.rb:3:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprock
ets/rails/legacy_asset_tag_helper.rb:7:in `<module:LegacyAssetTagHelper>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprock
ets/rails/legacy_asset_tag_helper.rb:6:in `<module:Rails>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprock
ets/rails/legacy_asset_tag_helper.rb:4:in `<module:Sprockets>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprock
ets/rails/legacy_asset_tag_helper.rb:3:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprock
ets/rails/helper.rb:45:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprock
ets/rails/helper.rb:45:in `<module:Helper>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprock
ets/rails/helper.rb:7:in `<module:Rails>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprock
ets/rails/helper.rb:6:in `<module:Sprockets>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprock
ets/rails/helper.rb:5:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprock
ets/railtie.rb:6:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sprockets-rails-2.3.3/lib/sprock
ets/railtie.rb:6:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails/
railtie.rb:3:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails/
railtie.rb:3:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails.
rb:11:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass/rails.
rb:11:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass-rails.
rb:1:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sass-rails-5.0.4/lib/sass-rails.
rb:1:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runti
me.rb:76:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runti
me.rb:76:in `block (2 levels) in require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runti
me.rb:72:in `each'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runti
me.rb:72:in `block in require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runti
me.rb:61:in `each'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runti
me.rb:61:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:13
4:in `require'
from C:/Ruby22/dev/demo/config/application.rb:7:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/command
s/commands_tasks.rb:78:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/command
s/commands_tasks.rb:78:in `block in server'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/command
s/commands_tasks.rb:75:in `tap'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/command
s/commands_tasks.rb:75:in `server'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/command
s/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/command
s.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
C:\Ruby22\dev\demo>
答案 0 :(得分:0)
尝试运行此命令
gem install nokogiri - --use-system-libraries