rvm
rvm is ruby version manager. Allow you to have multiple ruby version.
To install rvm, run
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 curl -sSL https://get.rvm.io | bash -s stable
To install a ruby version, run
rvm install 2.4.2
To set it default, use
rvm --default use 2.4.2