LoonSoft LLC
RSS Archive
September 13, 2011
Rvm & Daemontools
Any rvm prior to 1.8.3 can’t be used in the “rvm exec” form inside daemontools.
The problem is that rvm leaves a bash wrapper around the ruby process, where daemontools requires that its managed processes exec away any wrappers.
You know you have this problem when svc -dk doesn’t actually kill your ruby process (but does kill the wrapper), causing daemontools to think the process is down (and thereby possibly spawn a new one, ad infinitum).
Upgrading to the latest head version is a good fix for this problem, but if you can’t do that, you can just set up your environment to use ruby directly in your daemontools run script thusly: #!/bin/bash
exec 2>&1
#load your ruby env
source /usr/local/rvm/scripts/rvm
rvm use yourruby@yourgemset
#exec normally
exec thin -e production -c . -p 7400 start
9:47am |
URL: tumblr.com/ZDaFtx9TsXV0
RSS feed: loonsoft.com/rss
Next post