Install RVM
The following downloads and executes the RVM installer
$ bash -s stable < \
<(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
I explain what this oneliner does:
The command in
<(...)
is executed and its output is made available through a file descriptor like/dev/fd/$id
(Bash guide)This filename becomes the argument of standard input redirection (it’s the first
<
)The downloaded data (which is the output of
curl
) happens to be a Bash script, so it’s executed from bash and it’s passedstable
parameter (that’s what-s
is for)The stable branch of RVM is finally installed
Run the following as the installer suggests
$source ~/.rvm/scripts/rvm
Finally append this to .bashrc
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
Each Ruby interpreter depends on some other software. RVM suggests what to install, depending on your operating system
$rvm requirements