Installing Ruby 2.x on CentOS 7
Recently, I found myself stuck for installing the ruby Gem
falkorlib on a CentOS 7 machine which feature by default only an old version of Ruby (i.e. 2.0).
If you want to install a more recent version of Ruby, you have mainly three options:
- Install a built RPM (using
rpmbuild) from ruby sources and a specific
- Rely on the CentOS Software Collections (SCL).
- Rely on RVM
Build and Install from Ruby sources
1 2 3 4 5 6
Then you will need to download Ruby source matching the spec files we are going to use, i.e.
- Version 2.3.8 for
- Version 2.4.9 for
- Version 2.5.7 for
- Version 2.6.5 for
Of course, you should be able to easily adapt these files to match your own wished version Then you can build the RPM from it and install it.
1 2 3 4 5 6 7 8 9