root@bubbling-brook:/# gem update --system
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/psych.rb:370:in `parse': (<unknown>): mapping values are not allowed in this context at line 11 column 52 (Psych::SyntaxError)
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/psych.rb:370:in `parse_stream'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/psych.rb:318:in `parse'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/psych.rb:245:in `load'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/config_file.rb:333:in `load_file'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/config_file.rb:198:in `initialize'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/gem_runner.rb:74:in `new'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/gem_runner.rb:74:in `do_configuration'
from /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/gem_runner.rb:39:in `run'
from /usr/local/rvm/rubies/ruby-2.2.2/bin/gem:21:in `<main>'
任何人都可以帮我解决这个错误。我试图在远程服务器上安装它并且遇到此错误。我已经成功安装了ruby但是rails给了我一个问题。
答案 0 :(得分:1)
首先,检查 rvm ,如果找不到则尝试使用:
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
或
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bashrc
加载RVM。
最后,您可以使用建议的@MattW安装。