1

I have created a Rails project but when I issues commands such as rails s, or rails c from within the project directory I get:

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>

Do I need to set my path variable? Please help!

Karl Neumann
  • 103
  • 1
  • 12
  • Does http://stackoverflow.com/questions/14135612/the-program-rails-can-be-found-in-the-following-packages-issue-with-some-app solve your problem? – Rahul Apr 02 '15 at 03:15

1 Answers1

0

You need to install the gems in your gemfile, using bundler. From the root of your app, type bundle. Next, run your commands using bundler, like bundle exec rails c or bundle exec rails s.

Brad Werth
  • 17,411
  • 10
  • 63
  • 88
  • I had to install bundler. when I run bundle exec rails c, for example, I get: Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0. So I installed ruby 2.0.0 with RVM and when I type rvm use 2.0.0 I get: RVM is not a function, selecting rubies with 'rvm use ...' will not work. You need to change your terminal emulator preferences to allow login shell. Sometimes it is required to use `/bin/bash --login` as the command. Please visit https://rvm.io/integration/gnome-terminal/ for an example. I am checking that info now. Thanks for the help. – Karl Neumann Apr 02 '15 at 03:39
  • It took a while to find the run command as login checkbox in linux mint which I just installed. Now it works. Your suggestions led me to the solution. Thanks again – Karl Neumann Apr 02 '15 at 04:16