Installing Ruby on CentOS 7
Environment
- AWS
- CentOS Linux release 7.0.1406 (Core)
Install required modules
1 | $ sudo yum -y install git libffi libffi-dev gcc openssl-devel readline-devel zlib-devel |
Download rbenv and ruby-build
1 | $ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv |
Set the rbenv PATH
1 | $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile |
1 | $ rbenv install -list |
Install Ruby
1 | $ rbenv install -v 2.0.0-p645 |
Reload
1 | $ rbenv rehash |
Switch to the installed version
1 | $ rbenv global 2.0.0-p645 |
Verify
1 | $ ruby -v |
That’s all.
Installing Ruby on CentOS 7
https://kenzo0107.github.io/en/2015/08/06/install-ruby-on-centos7/