2013-08-04 41 views
0

我已经在linode上设置了我的rails应用程序,并且网站按预期工作。我想“SSH”后访问的Rails控制台荷兰国际集团在我的控制台,但我收到以下错误(注意我从我的应用程序运行的命令主目录):无法访问VPS上的Rails生产控制台

~/apps/my_app$ bundle exec rails c production - Could not locate Gemfile 

~/apps/my_app$ RAILS_ENV=production rails console -bash: /usr/bin/rails: No such file or directory 

~/apps/my_app$ RAILS_ENV=production bundle exec rails c - Could not locate Gemfile 

我的Ruby 1.9.3安装和我的gemfile我有:gem 'rails', '3.2.9'

回答

2

错误说你缺少Gemfile。确保从ls命令的输出(例如,您从哪里得到~/apps/my_appGemfile在这里。我的猜测是要么你不在正确的目录中,要么Gemfile没有被部署到你的仓库。

+1

明白了。所以你必须从Gemfile的目录运行命令。必须去'〜/ apps/my_app/current',然后'bundle exec rails c production'工作。谢谢! – pratski

+0

是'bundle exec'希望你在你的rails应用程序的根目录下。很高兴它有帮助 – mdemolin