RubyGems 1.5.2 Manual Upgrade

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

$ gem -v
$ 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

  $ 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:


Related posts:

Got something to say? Go for it!