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.
This package installs rvm with some defaults:
- stable rvm is used;
- rvm is installed using
mixed-mode
install: usable by all users on the system, with isolated rubies/gemsets in user's $HOME (see more here); - rvm is installed into
/usr/share/rvm
(as Debian/Ubuntu convention); - automatic updates provided by a Ubuntu PPA;
Additionally some old packages required to build old ruby binaries (like libssl1.0-dev
) are automatically available in the PPA too.
You need software-properties-common
installed in order to add PPA
repositories.
If not installed, open a terminal (Ctrl+Alt+T
) and run:
sudo apt-get install software-properties-common
Open a terminal (Ctrl+Alt+T
) and run:
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm
Add your user to rvm
group ($USER
will automatically insert your username):
sudo usermod -a -G rvm $USER
Now, in order to always load rvm, change the Gnome Terminal to always perform a login.
At terminal window, open the application menu, then Preferences
. Click on Unnamed
profile, select the Command
tab and check Run command as login shell
.
Or instead, if you cannot force terminal to perform a login, or you're facing Command 'rvm' not found
, you can run the following command to append it to your .bashrc
:
echo 'source "/etc/profile.d/rvm.sh"' >> ~/.bashrc
A lot of changes were made (scripts that needs to be reloaded, you're now member of rvm
group) and in order to properly get all them working, you need to reboot (in most cases a logout/login is enough, but in some Ubuntu derivatives or some terminal emulators, a shell login is not performed, so we advise to reboot).
Now you're ready to install rubies. Open a terminal (Ctrl+Alt+T
) and run:
rvm install ruby
RVM complete instructions are available at RVM repository: https://github.com/rvm/rvm
Additionally you can check manual pages too: open a Terminal (Ctrl+Alt+T
) and run:
man rvm
After install RVM, your user was added to a new group, new environment files were created, etc. Usually a logout, login is enough. But in case you're still facing some issues (usually due terminals not running login shells, etc), just try a system reboot.
If you're facing the following error:
Cannot add PPA: 'ppa:~rael-gc/ubuntu/rvm'.
ERROR: '~rael-gc' user or team does not exist
Sounds like you're under a proxy. Please, follow instructions to add-apt-repository to work through a proxy.
Check if your terminal is performing a bash login like describe on Step 2 "Change your terminal window". Or instead, you can run the following command to append it to your .bashrc
:
echo 'source "/etc/profile.d/rvm.sh"' >> ~/.bashrc
Fine. First install the rvm-installer
keys:
gpg --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
Then run:
rvmsudo rvm get master
If you already rebooted, and you're facing any file permission issues during any RVM usage, like:
Following files may be not writable
sudo is needed
orCannot utime: Operation not permitted
You can fix it with:
rvmsudo rvm cleanup all
rvm fix-permissions
Become a backer and support us with a small monthly donation to help us continue our activities.
Become a sponsor and get your logo on our README on Github with a link to your site.