Question

I am using Putty to connect to my localhost, and I don't have any problems apparently, however, when I run command rails s to start my rails 4.0.0 application from Putty, it gives me this message:

jose@jose-laptop:~/rails/dedicated-agenda$ rails s

The program 'rails' can be found in the following packages:

  • ruby-railties-3.2

  • ruby-railties-4.0

Try: sudo apt-get install

I don't get that message from the terminal though, the application starts running just fine.

I had to reinstall ubuntu so I upgraded to ubuntu 14.04 just in case you need to know.

I don't know if I am missing something in my ssh settings or how could I use rails s from Putty.

Thanks in advance.

Was it helpful?

Solution

Your PATH environment variable is set differently when you are executing programs in an interactive shell and by ssh(using putty).

Use absolute path of the program to not depend on the PATH variable.

You can also set the right PATH variable at ~/.profile file and load the updated variables using the command source ~/.profile. Now, you should be able to run the command.

OTHER TIPS

You can use the command

>which rails

to see where rails is installed on your working session. Then you need to make sure that is in your path when you ssh in.

If you are ssh'ing in as a different use then that user may not have permission to see the rails executable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top