Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Daemon Generator

Daemon Generator

To get yourself rolling: > sudo gem install daemons > ./script/plugin install [optional -x] http://svn.kylemaxwell.com/rails_plugins/daemon_generator/trunk/ > ./script/generate daemon <name>

Then insert your code in the lib/daemons/<name>.rb stub. All pid’s and logs will live in the normal log/ folder. This helps to make things Capistrano friendly.

Individual control script: > ./lib/daemons/<name>_ctl [start|stop|restart]

App-wide control script (I add this to my capistrano recipe’s after_restart task): > ./script/daemons [start|stop|restart]

NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly