Supervisord rails - 找不到命令 'RAILS_ENV=production'
Supervisord with rails - can't find command 'RAILS_ENV=production'
我尝试 运行 sidekiq 服务与 supervisord
这是我的配置:
[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
您的环境不应在命令中设置,而应在单独的环境值中设置。
environment=RAILS_ENV=production
看到这个问题。
Supervisor and Environment Variables
我尝试 运行 sidekiq 服务与 supervisord
这是我的配置:
[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
您的环境不应在命令中设置,而应在单独的环境值中设置。
environment=RAILS_ENV=production
看到这个问题。
Supervisor and Environment Variables