Thursday, 31 January 2013

RVM is not a function, selecting rubies with 'rvm use ...' will not work.

The problem:

So I'm writing a rails app using my Ubuntu 12.10 box at home, and after I installed rvm and tried to follow the tutorial to set up rails here @ http://www.unfoldingcode.com/2011/05/using-rvm-to-install-rails-31-on-ubuntu.html

However, I got the error stating that
'RVM is not a function, selecting rubies with 'rvm use ...' will not work.'

The solution:

You need to change your terminal emulator preferences to allow login shell. Sometimes it is required to use `/bin/bash --login` as the command. Please visit https://rvm.io/integration/gnome-terminal/ for a example

Now I don't want to go through the logging process as suggested since it messes up my configuration, so what I ended up doing to make it work was simply pasting this following line into my ~/.bashrc file:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

No comments:

Post a Comment