为什么“rails runner -e production”不起作用?

时间:2013-10-30 13:20:23

标签: ruby-on-rails ruby unicorn rvm-capistrano

要解决我在“will_paginate error in production undefined method 'paginate'”中讨论的问题,我尝试了运行:

script/rails runner -e production

bundle exec script/rails runner -e production
服务器上的

就像这个github问题中提出的那样:https://github.com/mislav/will_paginate/issues/308#issuecomment-17167158

但是我收到以下错误:

bundler: command not found: script/rails
Install missing gem executables with `bundle install`

捆绑安装没有帮助。有什么建议吗?

我正在使用:Ruby 2.0.0p247,Rails 4.0.0,Ubuntu 12.10 LTS,Unicorn,Capistrano

2 个答案:

答案 0 :(得分:8)

请改为尝试:

bundle exec rails runner -e production

答案 1 :(得分:5)