http://www.ruby-lang.org/ja/ ここからアーカイブをダウンロードします
Ruby本体をインストールします
tar xvzf ruby-1.8.4.tar.gz
cd ruby-1.8.4
ls
./configure
make
make install
Gemをインストール
tar xvzf rubygems-0.8.11.tgz
cd rubygems-0.8.11
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
Railsをインストール
gem install rails
[root@localhost]# gem install rails
Attempting local installation of ‘rails’
Local gem file not found: rails*.gem
Attempting remote installation of ‘rails’
Updating Gem source index for: http://gems.rubyforge.org
Install required dependency rake? [Yn] Y
Install required dependency activesupport? [Yn] Y
Install required dependency activerecord? [Yn] Y
Install required dependency actionpack? [Yn] Y
Install required dependency actionmailer? [Yn] Y
Install required dependency actionwebservice? [Yn] Y
Successfully installed rails-1.1.6
Successfully installed rake-0.7.1
Successfully installed activesupport-1.3.1
Successfully installed activerecord-1.14.4
Successfully installed actionpack-1.12.5
Successfully installed actionmailer-1.2.5
Successfully installed actionwebservice-1.1.6
Installing RDoc documentation for rake-0.7.1…
Successfully installed activesupport-1.3.1
Successfully installed activerecord-1.14.4
Successfully installed actionpack-1.12.5
Successfully installed actionmailer-1.2.5
Successfully installed actionwebservice-1.1.6
Installing RDoc documentation for rake-0.7.1…
Installing RDoc documentation for activesupport-1.3.1…
Installing RDoc documentation for activerecord-1.14.4…
Installing RDoc documentation for actionpack-1.12.5…
Installing RDoc documentation for actionmailer-1.2.5…
Installing RDoc documentation for actionwebservice-1.1.6…
Railsのコマンドが使えることを確認