【问题标题】:Why is "rails runner -e production" not working?为什么“rails runner -e production”不起作用?
【发布时间】:2023-03-15 06:21:01
【问题描述】:

为了解决我在“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

【问题讨论】:

  • bundle exec rails runner -e production 呢?
  • 我已经试过了...
  • 您的第一个建议有效;我没有看到您删除了“脚本/”。您要发布答案,以便我接受吗?
  • 'script/rails' 在 rails 4 版本中不存在尝试不使用'script/'
  • @Monk_Code 很高兴听到!当然可以。

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


【解决方案1】:

试试这个:

bundle exec rails runner -e production.

【讨论】:

    【解决方案2】:
    猜你喜欢
    • 2014-09-12
    • 2014-10-23
    • 2013-05-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-14
    • 1970-01-01
    • 2018-06-08
    相关资源
    最近更新 更多