带导轨的Supervisord - 无法找到命令' RAILS_ENV =生产'

时间:2015-07-10 18:09:43

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

我尝试使用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

1 个答案:

答案 0 :(得分:0)

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

environment=RAILS_ENV=production

看到这个问题。

Supervisor and Environment Variables