Automatically Restart script/server For Easier Plugin Development with FSEvents
When developing a Rails plugin, you are required to restart the server so that your plugin will be reloaded. You’ll notice that after a while this becomes a rather tedious process, especially if you are working on a hot-off-the-press new plugin.
Following suit on my autotest with FSEvents, I opted to listen for any changes to the vendor/plugins and lib directories to restart the server as required. Thus freeing me of the horrible grunt work of restarting the server.
Note: This is Mac OS X 10.5 Leopard specific.
The Incantation
Create the required file script/autorestart_server, and put this beauty in it.
For an easy to copy dump, click “view plain“.
Note: Don’t forget to make it executable! chmod u+x script/autorestart_server 
Automatically Restarting script/server
Now feel free to execute script/autorestart_server 
Wondering where else I can inject FSEvents into, its quite a handy little tool…


