[英]bundle not found when running services using upstart/foreman
我正在Ubuntu 12.04上為Rails 4應用程序設置臨時環境。 我使用:-rbenv用於管理紅寶石-capistrano用於deployemnt-工頭用於管理服務
特別是,我想將que作為服務運行。 我的Procfile看起來像
que: bundle exec rake que:work
我已經成功導出了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
但是,如果我進入/ home / deployer / apps / sapp / releases / 20140307080502,並且手動運行bundle exec rake que:work
,則執行rake。
我在這里想念什么嗎?
謝謝。
你可以有.bash_profile
嗎?
su
不會讀取.bashrc
。
我用創建.bash_profile
# Load the default .profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile"
# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.