RVM is the acronym for Ruby version Manager and is a command-line tool that allows you to easily install, manage, and use multiple versions of Ruby. Different rails projects use RVM to switch freely when using the same version of Ruby and Rails.
Installing RVM
Install RVM (development version)-Installing Ruby development
\curl -sSLhttps://get.rvm.io | bash
Install RVM stable with ruby-stable version with Ruby:
\curl -sSLhttps://get--ruby
View Ruby version
list
You will see the following output:
rvm rubies ruby-2.2.0 [ x86_64 ]=* ruby-2.2.1 [ x86_64 ] ruby-2.2.3 [ x86_64 ]# => - current# =* - current && default# * - default
View current Ruby version
rvm current
Switch Ruby version
Now 2.2.1 is the ruby version being used, if you want to switch to 2.2.2:
rvm --defaultuse2.2.2
If the 2.2.2 version is not installed, the command will be prompted ruby-2.2.2 is not installed.
to install:
install ruby-2.2.2
RVM Switching Ruby versions