參考文章:http://www.ruby-lang.org/zh_cn/documentation/installation/git
文章給出了不一樣平臺的多種方法。個人是centos,我選擇了一個比較簡單的方法 ,github
github 上面的一個第三方工具。centos
安裝和使用方法詳情請看裏面的README文件。ruby
安裝這個工具工具
wget -O ruby-install-0.6.1.tar.gz https://github.com/postmodern/ruby-install/archive/v0.6.1.tar.gz tar -xzvf ruby-install-0.6.1.tar.gz cd ruby-install-0.6.1/ sudo make install
ruby-install --latest ruby