rubygems インストール
1. rubygems をダウンロードする
http://rubygems.org/ からファイルをダウンロードする。
$ wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
2. ダウンロードしたファイルを展開する
$ tar zxf rubygems-1.3.7.tgz
3. インストールする
$ cd rubygems-1.3.7
$ ruby setup.rb --prefix=$HOME/opt/gems
RubyGems 1.3.7 installed
(途中省略)
RubyGems installed the following executables:
/home/foo/opt/gems/bin/gem
4. 環境設定を行う
$ vi ~/.bashrc # configuration: rubygems export PATH=$HOME/opt/gems/bin:$HOME/opt/gems_repository/bin/:$PATH export RUBYLIB=$HOME/opt/gems/lib export GEM_HOME=$HOME/opt/gems_repository $ . ~/.bashrc
5. インストールの確認を行う
$ gem -v 1.3.7