Rails One-Click Installer の gem を手動 update する

前と同じ Rails 環境を Windows 上に作り直そうと Ruby Installer にアクセスしてみたら
One-Click Installer は old となってた。そーいえば、そんな話を聞いた気が…。
細かいことは置いといてインストール続行。gem バージョンを確認したら

>gem environment
RubyGems Environment:
  - VERSION: 0.9.4 (0.9.4)
  - INSTALLATION DIRECTORY: c:/tmp/ruby1.8.6-26/lib/ruby/gems/1.8
  - GEM PATH:
     - c:/tmp/ruby1.8.6-26/lib/ruby/gems/1.8
  - REMOTE SOURCES:
     - http://gems.rubyforge.org

当たり前だけど、やっぱり古い。たしか Rails2.2 以降は gem が 1.3.0 以上じゃないとダメなので gem アップデートを実行。

>gem update --system 

あれ?エラー?おんじゃ

>gem install rubygems-update 

こっちでもエラー?

前はこのどっちかで gem アップデートできたんだけど、今はNGっぽい。gem 古すぎ?
ググってみたら、やっぱり同じことで悩んでた人いたみたい。 解決策みっけ〜♪

Hi, I have some problems with that in Windows xp to, but after looking around in the web the simpliest solution is:

1. Download Ruby Gem files from RubyForge => http://rubyforge.org/frs/?group_id=126
2. Unzip de File, open the command Line and go to the directory in which you unzip the files.
3. Execute the setup.rb file, typing "ruby setup.rb"

install gems problem in windows

さっそく http://rubyforge.org/projects/rubygems/ から最新版の rubygems-1.3.5.zip を取得。解凍フォルダにある setup.rb を実行。

C:\tmp\rubygems-1.3.5>ruby setup.rb
RubyGems 1.3.5 installed

・ソ=== 1.3.5 / 2009-07-21

Bug fixes:

* Fix use of prerelease gems.
* Gem.bin_path no longer escapes path with spaces. Bug #25935 and #26458.

Deprecation Notices:

* Bulk index update is no longer supported (the code currently remains, but not
  the tests)
* Gem::manage_gems was removed in 1.3.3.
* Time::today was removed in 1.3.3.

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

RubyGems installed the following executables:
        c:/tmp/ruby1.8.6-26/bin/gem

C:\tmp\rubygems-1.3.5>gem -v
1.3.5

おし、解決! :-)

環境
WinXP + Ruby 186-26