This fork is no longer maintained. Visit https://github.com/ranmocy/guard-rails for the current official fork.
Want to restart your Rails development server whilst you work? Now you can!
guard 'rails', :port => 5000 do
watch('Gemfile.lock')
watch(%r{^(config|lib)/.*})
end
Lots of fun options!
:portis the port number to run on (default3000):environmentis the environment to use (defaultdevelopment):start_on_startwill start the server when starting Guard (defaulttrue):force_runkills any process that's holding open the listen port before attempting to (re)start Rails (defaultfalse).:daemonruns the server as a daemon, without any output to the terminal that ranguard(defaultfalse).:debuggerruns the server with the debugger enabled (defaultfalse). Required ruby-debug gem.:timeoutwaits this number of seconds when restarting the Rails server before reporting there's a problem (default20).:serverlets you specify the webserver engine to use (try:server => :thin).
This is super-alpha, but it works for me! Only really hand-tested in Mac OS X. Feel free to fork'n'fix for other OSes, and to add some more real tests.
