1. 安装gcc
yum install gcc -c++ yum install gcc -g77 yum install flex autoconf zlib curl zlib-devel curl-devel bzip2 bzip2-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel
这里gcc -g77 会出现nothing to do, 不要奇怪, 我运行也如此, :)
2. 下载ruby
wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
tar -xvzf ruby-1.9.2-p180.tar.gz
cd ruby-1.9.2-p0/
./configure
make && sudo make install
3. 检查Ruby安装情况
ruby -v
4. 安装过后更新 gem
gem update --system gem update
5. 安装rails
gem rails -v=3.0.9
Thanks,
Ivan