In the past (March 2013) I was able to run this plist file and source my .bash_profile to get rvm to load as a function and pull in my default ruby 1.9.3 but now the process just uses the system ruby 1.8.7, what is going on? I have done some research and googling but nothing has turned up to be helpful, perhaps it is my lack of complete understanding when it come so OS scripting, I'm sure this can be accomplished. April 1st I upgraded to 10.7.5 and that is when my issues started:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.company.myapp</string> <key>ProgramArguments</key> <array> <string>/bin/sh</string> <string>/sites/myapp/passenger_start</string> </array> <key>StandardErrorPath</key> <string>/var/log/passenger_launchd.stderr.log</string> <key>StandardOutPath</key> <string>/var/log/passenger_launchd.stdout.log</string> <key>KeepAlive</key> <true /> <key>UserName</key> <string>myuser</string> </dict> </plist>
source ~/.bash_profile cd /sites/myapp passenger start -a 127.0.0.1 -p 3000 -e staging
alias ll="ls -l" export ARCHFLAGS="-arch x86_64" PATH=~/Scripts:/usr/local/bin:/usr/local/sbin:$PATH:/usr/local/mysql:/usr/local/mysql/bin:/usr/local/mysql/scripts export PATH [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
The rails application works fine if I simply do a "passenger start" from the command line.