RVM : The program ‘rails’ can be found in the following packages:

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*

2 thoughts on “RVM : The program ‘rails’ can be found in the following packages:

  1. 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*

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s