Gem安装错误(gem install sass)

时间:2016-08-30 08:35:04

标签: ruby-on-rails ruby rubygems

我正在使用我的root帐户终端: 我安装了ruby(yum install ruby​​),当tryng安装sass或其他宝石时,它给了我这个错误:

[root@ve555 /]# ruby -v
ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
[root@ve555 /]# gem install sass
Successfully installed sass-3.4.22
/usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- json/pure (LoadError)
        from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/share/gems/gems/json-1.7.7/lib/json.rb:60:in `rescue in <module:JSON>'
        from /usr/share/gems/gems/json-1.7.7/lib/json.rb:57:in `<module:JSON>'
        from /usr/share/gems/gems/json-1.7.7/lib/json.rb:54:in `<top (required)>'
        from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/text.rb:16:in `<top (required)>'
        from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/code_object.rb:28:in `<class:CodeObject>'
        from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/code_object.rb:26:in `<top (required)>'
        from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/generator/markup.rb:59:in `<top (required)>'
        from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/generator/darkfish.rb:6:in `<top (required)>'
        from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rdoc.rb:563:in `<top (required)>'
        from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rubygems_hook.rb:64:in `load_rdoc'
        from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rubygems_hook.rb:229:in `setup'
        from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rubygems_hook.rb:142:in `generate'
        from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rubygems_hook.rb:54:in `block in generation_hook'
        from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rubygems_hook.rb:53:in `each'
        from /usr/share/gems/gems/rdoc-4.0.0/lib/rdoc/rubygems_hook.rb:53:in `generation_hook'
        from /usr/local/share/ruby/site_ruby/rubygems/request_set.rb:189:in `call'
        from /usr/local/share/ruby/site_ruby/rubygems/request_set.rb:189:in `block in install'
        from /usr/local/share/ruby/site_ruby/rubygems/request_set.rb:188:in `each'
        from /usr/local/share/ruby/site_ruby/rubygems/request_set.rb:188:in `install'
        from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:205:in `install_gem'
        from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:255:in `block in install_gems'
        from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:251:in `each'
        from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:251:in `install_gems'
        from /usr/local/share/ruby/site_ruby/rubygems/commands/install_command.rb:158:in `execute'
        from /usr/local/share/ruby/site_ruby/rubygems/command.rb:310:in `invoke_with_build_args'
        from /usr/local/share/ruby/site_ruby/rubygems/command_manager.rb:169:in `process_args'
        from /usr/local/share/ruby/site_ruby/rubygems/command_manager.rb:139:in `run'
        from /usr/local/share/ruby/site_ruby/rubygems/gem_runner.rb:55:in `run'
        from /usr/bin/gem:21:in `<main>'

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

1 个答案:

答案 0 :(得分:1)

您是否在gem install json_pure之前尝试过:gem install sass? (这应该在评论部分,但我的声誉不足)