Assumptions:
You have RVM installed using the steps documented in http://www.rvm.io
Steps:
Add the following line to your ~/.bash_profile
or ~/.bashrc
source ~/.rvm/scripts/rvm
Then, either open a new terminal window or run
. ~/.bash_profile
Check if everything works
type rvm | head -n 1
If all goes well, you should see the message:
rvm is a function
Credit: Stackoverflow