Installing a Newer Ruby with RVM
My department’s Linux machines don’t have a very new Ruby installed (1.8.7, which was released in 2008 and which has since been retired by the Ruby community). This old version is missing a number of useful features, like lookaround assertions in regular expressions! Instead of upgrading the system-wide Ruby, they recommend that each individual install their own custom Ruby using RVM. Here are the steps to do so:
- Log in to one of the
- Learn how to copy and paste into the shell from your local operating system. Or get good at typing.
- Install the RVM developer’s public key:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
- Install RVM:
\curl -sSL https://get.rvm.io | bash -s stable
This places some scripts inside your home directory and adds some lines to your shell’s configuration files to load up RVM when you first login.
- Install a more recent version of Ruby:
rvm install 2.3.0
- Test that the expected version of Ruby is running:
Let me know if you encounter errors.