1. Type : gem env, look at the EXECUTABLE DIRECTORY value
2. Add the path to that directory to ~/.bashrc:
PATH="${PATH}:/home/your-user-name/.rvm/gems/ruby-1.8.7-p299/bin"
3. Open a new terminal
4. Type : rails -v
You will now see that rails command is recognized.