RVM is not recognized until I run "source ~ / .profile" in the terminal

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 is not working until I run "source ~ / .profile"? I would not do this every time I start the car or open a new terminal window.

+1
linux ubuntu profile rvm
source share
2 answers

RVM gives a nice description https://rvm.io/support/faq/#shell_login

you should use .bash_profile - unless you have a good reason against it, but I don't know much.

Rvm puts the source line in one of your RC files, in your case it was .profile, you have to delete this line, create .bash_profile and update rvm:

 sed -i '/source.*rvm/ d' ~/.profile touch ~/.bash_profile rvm get head --auto-dotfiles 
+7
source share

Your shell does not load your ~ / .profile file. This is probably loading ~ / .bashrc or ~ / .bash_profile or one of several other possible things. See the documentation for your shell or run it under strace to find out what files it loads at startup.

+1
source share

All Articles