CentOS 升级 Ruby
升级方案
参考链接: http://ask.xmodulo.com/upgrade-ruby-centos.html
If you already installed ruby and ruby-devel packages with yum before, remove them first before upgrading Ruby.
1 | sudo yum remove ruby ruby-devel |
Build and install the latest Ruby from the source as follows.
1 | sudo yum groupinstall "Development Tools" |
Finally, update Rubygems and Bundler.
1 | sudo gem update --system |
If you have any pre-installed gems with an older version of Ruby, update the gems.
1 | sudo gem update |
To use the installed Ruby/Rubygems, open a new terminal. Then check the version of installed Ruby and Rubygems as follows.
1 | ruby --version |