RubyGems 1.5.2 Manual Upgrade

今天想更新RubyGems,突然发现 gem update ––system 貌似不work了:

$ gem -v
1.5.0
$ gem update --system
Updating RubyGems
ERROR:  While executing gem ... (NoMethodError)
    undefined method `version' for nil:NilClass

turns out 这是 RubyGems 1.5.0 和 1.5.1 的一个bug,1.5.2 fix了这个issue。

Manual的Upgrade可以绕过 reinstall 的麻烦和繁琐,且更低碳环保:

$ gem install rubygems-update
Fetching: rubygems-update-1.5.2.gem (100%)
Successfully installed rubygems-update-1.5.2
1 gem installed
$ update_rubygems
RubyGems 1.5.2 installed

=== 1.5.2 / 2011-02-10

NOTE:  RubyGems 1.5.0 and 1.5.1 have a broken <tt>gem update --system</tt>.

To upgrade you'll need to use the manual upgrade recipe.  Using sudo/su as
appropriate:

  $ gem install rubygems-update
  $ update_rubygems

Bug Fixes:

* Fixed <tt>gem update --system</tt>.  RubyGems can now update itself again.


---------------------------------------------------------------------------

RubyGems installed the following executables:
    /Users/samson/.rvm/rubies/ruby-1.9.2-p136/bin/gem

历史上的今天:

Related posts:

Got something to say? Go for it!

使用新浪微博登陆