sstephenson/rbenv — Issue #167: rbenv and launchd
Author: jamiehodge
Created: 2011-12-15 20:42:13+00:00
State: open

I am trying to use launchd to load unicorn as a launch daemon. I have created a deploy user, with rbenv, 1.9.3-p0 and bundler installed. Here is my current plist file:

Label
org.myapp
RunAtLoad

KeepAlive

UserName
deploy
ProgramArguments

/Users/deploy/.rbenv/shims/bundle
exec
unicorn
./config/unicorn.rb

WorkingDirectory
/usr/local/www/app

I have tried placing the rbenv initializer in ~/.profile and ~/bash_profile. I have also tried hardcoding environment variables in the plist, but in each case, some path related issues crops up. Would someone please be so kind as to tell me what I'm doing wrong (outside of deploying to OS X)?