【发布时间】:2014-03-07 09:16:42
【问题描述】:
我正在为 Ubuntu 12.04 上的 Rails 4 应用程序设置暂存环境。 我用: - rbenv 用于管理红宝石 - 用于部署的 capistrano - 管理服务的领班
特别是,我想将 que 作为服务运行。我的 Procfile 看起来像
que: bundle exec rake que:work
我已经成功地为 upstart 导出了 Procfile。我的 sapp-que-1.conf 看起来像
start on starting ft-id-que
stop on stopping ft-id-que
respawn
exec su - deployer -c 'cd /home/deployer/apps/sapp/releases/20140307080502; export PORT=5000; bundle exec rake que:work >> /home/deployer/apps/sapp/current/log/que-1.log 2>&1'
当我尝试启动它时 (sudo start sapp) 我收到以下错误:
-su: bundle: command not found
但是,如果我 cd 进入 /home/deployer/apps/sapp/releases/20140307080502 并手动运行 bundle exec rake que:work,则执行 rake。
我错过了什么吗?
谢谢。
【问题讨论】:
标签: ruby-on-rails rbenv foreman