Ruby Version Manager (RVM)
RVM is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems.
There are three different ways to install and configure RVM.
Single-User installations (recommended) - For an isolated install within a user’s $HOME, not for root.
Multi-User installations - For server administrators - For an installation usable by all users on the system - Please note that Single-User supersedes Multi-User. This also used to be called the System-Wide Install. Using this type of installation without knowledge how umask works is a big security risk.
Mixed mode installations - For an installation usable by all users on the system - with isolated rubies/gemsets within a user’s $HOME. Installation instructions are exactly the same as for Multi-User installations, the difference is in users environment.
1. Install GPG keys
As a first step install GPG keys used to verify installation package:
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
In case you encounter an issues check security
2. Install RVM stable version
\curl -sSL https://get.rvm.io | bash -s stable
Single-User Install Location: ~/.rvm/
If the install script is run as a standard, non-root user, RVM will install into the current users’s home directory.
3. Reload shell configuration & test
Close out your current shell or terminal session and open a new one (preferred). You may load RVM with the following command:
If installation and configuration were successful, RVM should now load whenever you open a new shell. This can be tested by executing the following command which should output rvm is a function as shown below.
type rvm | head -n 1
NOTE: Before reporting problems check
rvm notes as it might contain important information.
Congratulations! You have successfully installed RVM.
Try out your new RVM installation
Below are some examples of how to install and use a Ruby under RVM.
Display a list of all known rubies. NOTE: RVM can install many more Rubies not listed.
rvm list known
Install a version of Ruby (eg 2.1.1):
rvm install 2.1
rvm use 2.1
rvm use 2.1 --default
Warning! PATH is not properly set up, /Users/cloudolife/.rvm/gems/ruby-2.6.1/bin is not at first place.
rvm get stable
--auto-dotfiles to resolve it.
rvm get stable --auto-dotfiles