sergio@sergio-VirtualBox:~/code$ rails -v
The program 'rails' is currently not installed. You can install it by typing:
sudo apt-get install rails
sergio@sergio-VirtualBox:~/code$ source ~/.profile
sergio@sergio-VirtualBox:~/code$ rails -v
Rails 3.2.1
Any ideas why the command doesn’t work until I run “source ~/.profile”? I would like to not have to do this every time I run my machine or open a new terminal window.
RVM provides quite good description https://rvm.io/support/faq/#shell_login
you should use .bash_profile – unless you have good reasons against it – but I do not know many.
Rvm puts a sourcing line in one of your RC files, in your case it was .profile, you should remove that line, create .bash_profile, and update rvm: