I installed RVM, Ruby 1.9.2 and Rails 3.0.9 on Lion which works fine. Only problem is, after I close the terminal I need to execute this:
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
for it to pick up RVM.I then need to make RVM use Ruby 1.9.2 first before I can do Rails stuff again.
How can I make this permanent?
After you first execute
you shouldn’t need to do it again. That line appends the necessary file inclusion information RVM into your
.bash_profile. If you are usingbash(as opposed to zsh, ksh, csh, tcsh or any other shell), then RVM will be accessible each time you open a new session. If you are using a different shell, that line may need to be in a different startup file. For example, if you are using zsh, then you’ll probably want to append it to your~/.zshrcfile.Having done this, simply running
rvm --default use ruby-1.9.2once should ensure that you have the desired version of Ruby by default. Note, you should not need to add this line to your.bash_profileor similar.