安装Ruby / RubyGems的错误@ Ubuntu的(Installing Ruby/Ruby

2019-10-17 17:57发布

我想从以下“中的步骤安装在Ubuntu Ruby on Rails的如何在Ubuntu 12.04 LTS(精确穿山甲)与RVM安装Ruby on Rails的 ”。

一切工作顺利,直到在这里:

gabi@ubuntu:~$ rvm rubygems current
Removing old Rubygems files...
Installing rubygems-1.8.25 for ruby-1.9.3-p385 ...
Error running 'env GEM_PATH=/home/gabi/.rvm/gems/ruby-1.9.3-p385:/home/gabi/.rvm/gems/ruby-1.9.3-p385@global:/home/gabi/.rvm/gems/ruby-1.9.3-p385:/home/gabi/.rvm/gems/ruby-1.9.3-p385@global GEM_HOME=/home/gabi/.rvm/gems/ruby-1.9.3-p385 /home/gabi/.rvm/rubies/ruby-1.9.3-p385/bin/ruby /home/gabi/.rvm/src/rubygems-1.8.25/setup.rb', please read /home/gabi/.rvm/log/ruby-1.9.3-p385/rubygems.install.log
Installation of rubygems did not complete successfully.

日志文件是这样的:

/home/gabi/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/yaml.rb:36:in `remove_method': method `to_yaml' not defined in Object (Nam
eError)
  from /home/gabi/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/yaml.rb:36:in `yamler='
  from /home/gabi/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/yaml.rb:33:in `class_eval'
  from /home/gabi/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/yaml.rb:33:in `yamler='
  from /home/gabi/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/yaml.rb:76:in `<top (required)>'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/custom_require.rb:36:in `require'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/custom_require.rb:36:in `require'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems.rb:680:in `load_yaml'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/config_file.rb:249:in `load_file'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/config_file.rb:190:in `initialize'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/gem_runner.rb:78:in `new'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/gem_runner.rb:78:in `do_configuration'
  from /home/gabi/.rvm/src/rubygems-1.8.25/lib/rubygems/gem_runner.rb:51:in `run'
  from setup.rb:38:in `<main>'

什么是完全相同的问题,我该怎么解决呢?

Answer 1:

不知道是什么问题,我觉得出事了上进行安装,但是我设法使其使用快速修复工作从这里 :

  1. :使用更新RVM rvm get head
  2. 使用删除所有手动安装的软件包: rvm pkg remove
  3. 使用安装所需的库: rvm requirements run
  4. 使用重新安装红宝石: rvm reinstall 1.9.3


Answer 2:

Only thing I could think of is if you're using the wrong Ruby version. If you're using rm, type rvm current and see if it's Ruby 1.9.



文章来源: Installing Ruby/Rubygems error @ Ubuntu