The rvm installation documentation instructs you to put the following line at the very end of your bash profile:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
For those, like me, who are not very familiar with bash scripting, this is what the line above does: [[ condition ]]
evaluates the condition inside the double brackets and returns true or false. The option -s file
tells bash to look for file
and decide whether it exists and is nonempty. So the line [[ -s "$HOME/.rvm/scripts/rvm" ]]
looks inside the default rvm scripts folder ~/.rvm/scripts/
for rvm, and returns true or false.