安装 OS X 10.9 和 homebrew (sudo mv /opt/local ~/macports) 后,我的 Rails 4.0.0 和 Ruby 2.0 安装停止工作。Ruby 仍然可以工作,但我无法再加载所有的 gem 来运行 Rails。所以我尝试删除 Ruby、Rails 和 RVM,然后重新安装。这是我尝试重新加载 Ruby 2.0 时得到的结果:
[2013-10-28 16:28:28] /Users/mac/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
current path: /Users/mac/.rvm/src/rubygems-2.1.10
command(6): env GEM_PATH=/Users/mac/.rvm/gems/ruby-2.0.0-p247:/Users/mac/.rvm/gems/ruby-2.0.0-p247@global:/Users/mac/.rvm/gems/ruby-2.0.0-p247:/Users/mac/.rvm/gems/ruby-2.0.0-p247@global GEM_HOME=/Users/mac/.rvm/gems/ruby-2.0.0-p247 /Users/mac/.rvm/rubies/ruby-2.0.0-p247/bin/ruby -d /Users/mac/.rvm/src/rubygems-2.1.10/setup.rb
Exception `LoadError' at /Users/mac/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems.rb:1082 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at /Users/mac/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems.rb:1091 - cannot load such file -- rubygems/defaults/ruby
/Users/mac/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/psych.rb:205:in `parse': (<unknown>): mapping values are not allowed in this context at line 2 column 30 (Psych::SyntaxError)
from /Users/mac/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
from /Users/mac/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/psych.rb:153:in `parse'
from /Users/mac/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/psych.rb:129:in `load'
from /Users/mac/.rvm/src/rubygems-2.1.10/lib/rubygems/config_file.rb:332:in `load_file'
from /Users/mac/.rvm/src/rubygems-2.1.10/lib/rubygems/config_file.rb:197:in `initialize'
from /Users/mac/.rvm/src/rubygems-2.1.10/lib/rubygems/gem_runner.rb:74:in `new'
from /Users/mac/.rvm/src/rubygems-2.1.10/lib/rubygems/gem_runner.rb:74:in `do_configuration'
from /Users/mac/.rvm/src/rubygems-2.1.10/lib/rubygems/gem_runner.rb:39:in `run'
from setup.rb:45:in `<main>'
which looks like this on the command line:
Extracting rubygems-2.1.10 ...
Removing old Rubygems files...
Installing rubygems-2.1.10 for ruby-2.0.0-p247............
Error running 'env GEM_PATH=/Users/mac/.rvm/gems/ruby-2.0.0-p247:/Users/mac/.rvm/gems/ruby-2.0.0-p247@global:/Users/mac/.rvm/gems/ruby-2.0.0-p247:/Users/mac/.rvm/gems/ruby-2.0.0-p247@global GEM_HOME=/Users/mac/.rvm/gems/ruby-2.0.0-p247 /Users/mac/.rvm/rubies/ruby-2.0.0-p247/bin/ruby -d /Users/mac/.rvm/src/rubygems-2.1.10/setup.rb',
please read /Users/mac/.rvm/log/1383002409_ruby-2.0.0-p247/rubygems.install.log
Installation of rubygems did not complete successfully.
Saving wrappers to '/Users/mac/.rvm/wrappers/ruby-2.0.0-p247'........
ruby-2.0.0-p247 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-2.0.0-p247 - #importing default gemsets, this may take time........................
Install of ruby-2.0.0-p247 - #complete
Ruby was built without documentation, to build it run: rvm docs generate-ri
任何帮助深表感谢!