【发布时间】:2011-11-01 14:57:06
【问题描述】:
自从我更新到 Mac OSX Lion 后,我无法安装任何 Gem。 每次我尝试安装任何 gem 时,终端窗口都会挂起。 我已经卸载了包括 ruby 在内的所有内容并重新安装了 Ruby Gems,但这并没有解决问题。
运行后: gem install rails --debug 我明白了(只显示第一行):
Exception `NameError' at /opt/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:177 - uninitialized constant Gem::Commands::InstallCommand
Exception `LoadError' at /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36 - no such file to load -- psych
Exception `LoadError' at /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:62 - no such file to load -- psych
Exception `Errno::EEXIST' at /opt/local/lib/ruby/1.8/fileutils.rb:243 - File exists - /Users/marcogallen/.gem/specs/rubygems.org%80
Exception `Errno::EEXIST' at /opt/local/lib/ruby/1.8/fileutils.rb:243 - File exists - /Users/marcogallen/.gem/specs/gems.github.com%80
Exception `EOFError' at /opt/local/lib/ruby/1.8/net/protocol.rb:135 - end of file reached
Exception `EOFError' at /opt/local/lib/ruby/1.8/net/protocol.rb:120 - end of file reached
Exception `EOFError' at /opt/local/lib/ruby/1.8/net/http.rb:1060 - end of file reached
GEM env 给出了这个:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.8
- RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11]
- INSTALLATION DIRECTORY: /opt/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /opt/local/bin/ruby
- EXECUTABLE DIRECTORY: /opt/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-11
- GEM PATHS:
- /opt/local/lib/ruby/gems/1.8
- /Users/[user]/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://rubygems.org/", "http://gems.github.com"]
- REMOTE SOURCES:
- http://rubygems.org/
- http://gems.github.com
我在这里完全一无所知,我希望有人能给我一些提示或什么。 运行 OSX Lion 的 MAC Book PRO
谢谢 马可
【问题讨论】: