运行gem env时出错

时间:2012-10-23 23:28:34

标签: ruby rubygems

当我运行gem env时,我收到以下错误:

Error loading RubyGems plugin "/home/chenge/.rvm/gems/ruby-1.9.2-p320@global/gems/rubygems-bundler-0.9.2/lib/rubygems_plugin.rb": undefined method `first' for #<String:0x8ec8670> (NoMethodError)

有人能帮我理解这意味着什么吗?感谢。

gem clean

Cleaning up installed gems...
Attempting to uninstall rvm-1.11.3.3
Unable to uninstall rvm-1.11.3.3:
    Gem::InstallError: gem "rvm" is not installed
Attempting to uninstall rubygems-bundler-0.9.2
Unable to uninstall rubygems-bundler-0.9.2:
    Gem::InstallError: gem "rubygems-bundler" is not installed
Attempting to uninstall bundler-1.1.3
Unable to uninstall bundler-1.1.3:
    Gem::InstallError: gem "bundler" is not installed


Clean Up Complete

2 个答案:

答案 0 :(得分:1)

您的rubygems-bundler已过时(0.9.2),安装最新版本(1.1.0)将解决此问题。

$ gem clean
$ gem install rubygems-bundler

我试过我的EC2实例,它可以工作。

答案 1 :(得分:-1)

问题可能是由以下原因造成的:

  • 错误安装Ruby
  • 错误地安装了RubyGem
  • 错误安装RVM

我建议你完全去掉rubygem。 (rm /home/chenge/.rvm/gems -rf)然后下载最新的rubygem然后重新安装它。