How do you restart Rails under Mongrel, without stopping and starting Mongrel

DEfusion picture DEfusion · Sep 16, 2008 · Viewed 8.6k times · Source

Is there a way to restart the Rails app (e.g. when you've changed a plugin/config file) while Mongrel is running. Or alternatively quickly restart Mongrel. Mongrel gives these hints that you can but how do you do it?

** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart).

** Rails signals registered. HUP => reload (without restart). It might not work well.

Answer

Lucas Oman picture Lucas Oman · Sep 16, 2008

You can add the -c option if the config for your app's cluster is elsewhere:

mongrel_rails cluster::restart -c /path/to/config