I just installed ubuntu, and after that I wanted to install RVM with ruby and rails 3.1.
Installations went fine but when I want to create a rails app it can\'t find the
You need to
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
This will allow you to load rvm when you start a new bash session
The work flow should work like this
$ mkdir new_rails_app
$ cd new_rails_app
$ vim .rvmrc
# edit the .rvmrc to use the correct Gemset Something like
rvm use ruby-1.9.2-p180@new_rails_app --create
#save and exit vim
$ rvm rvmrc load
# you should see a prompt that your Gemset was loaded
$ gem install rails
$ rails new .
You now have a working rails directory for a new app using rvm. There are other little tricks like auto loading your rvmrc's but I left that out just for the sake of the "easiest" route.
I meet the issue "command not found: rails" too, but I'm using oh-my-zsh for the shell prompt, and I fix the issue by copy the line
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
from file ~/.bashrc to ~/.zshrc, and it works well. Hope it can give you some help.