【问题标题】:Supervisord with rails - can't find command 'RAILS_ENV=production'使用 Rails 监督 - 找不到命令“RAILS_ENV=production”
【发布时间】:2015-09-29 14:25:34
【问题描述】:

我尝试使用 supervisord 运行 sidekiq 服务

这是我的配置:

[program:my-app-sidekiq-staging]
directory=/srv/www/DOMAIN/current
command=RAILS_ENV=production /usr/local/rvm/bin/rvm ruby-2.2.2@my-app-staging do bundle exec sidekiq -e production -d -C config/sidekiq.yml -L log/sidekiq.log
autostart=true
autorestart=true
redirect_stderr=true

启动后出现致命错误:

can't find command 'RAILS_ENV=production'

我很困惑,因为我的 rails 配置运行时没有错误

directory=/srv/www/DOMAIN/current
command=RAILS_ENV=production /usr/local/rvm/bin/rvm ruby-2.2.2@my-app-staging do bundle exec passenger start -S tmp/unicorn/ilp-app-unicorn.sock --environment production --friendly-error-pages

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-4 deployment sidekiq supervisord


    【解决方案1】:

    您的环境不应在命令中设置,而应在单独的环境值中设置。

    environment=RAILS_ENV=production
    

    看到这个问题。

    Supervisor and Environment Variables

    【讨论】:

      猜你喜欢
      • 2014-12-07
      • 2014-09-12
      • 1970-01-01
      • 1970-01-01
      • 2010-11-01
      • 1970-01-01
      • 2020-03-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多