0

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.

4

2 回答 2

0

你可以使用命令

>which rails

查看在您的工作会话中安装 rails 的位置。然后你需要确保当你 ssh 进入时它在你的路径中。

如果您将 ssh 用作其他用途,则该用户可能无权查看 rails 可执行文件。

于 2014-05-05T09:03:37.137 回答
0

当您在交互式 shell 中和通过 ssh(使用 putty)执行程序时,您的 PATH 环境变量设置不同。

使用程序的绝对路径不依赖于 PATH 变量。

您还可以在 ~/.profile 文件中设置正确的 PATH 变量,并使用命令source ~/.profile加载更新的变量。现在,您应该可以运行该命令了。

于 2014-05-04T03:33:57.697 回答