Sometime I see this message though I have proper versions of rails / ruby installed in my system.
john@john-Inspiron-7347:~/projects/thepact (drug_test_final)$ rails c The program 'rails' can be found in the following packages: * ruby-railties-3.2 * ruby-railties-4.0 Try: sudo apt-get install <selected package>
Solution (Not best solution)
john@john-Inspiron-7347:~/projects/thepact (drug_test_final)$ cd ../ john@john-Inspiron-7347:~/projects$ cd thepact/
make sure you have the proper version of ruby as default
$ rvm list =* ruby-2.1.0 [ x86_64 ] ruby-2.2.1 [ x86_64 ]
Answer suggested by Prakash Poudel in comments
seems like problem in selection of appropriate version of ruby!
in my case i have added following code into .bashrc[[ -s “$HOME/.rvm/scripts/rvm” ]] && source “$HOME/.rvm/scripts/rvm” # Load RVM into a shell session *as a function*