- 下载源代码:
curl -O http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.gz
- 解压:
tar xf ruby-2.2.2.tar.gz
- 编译:
cd ruby-2.2.2 ./configure --prefix=/opt/local/ --program-suffix=22 make sudo make install
- 安装 rails:
sudo gem22 install rails -- --with-extension-lib=/opt/local/lib --with-opt-dir=/opt/local
- 测试:
rails new hello cd hello rails server