No longer maintained. Latest version is at https://github.com/ranmocy/guard-rails
Go to file
Tim Preston 3ac650799c Swapped run_all for reload.
This means hitting return will not reload rails server,
instead 'r' or 'reload' must be issued.
2011-10-17 14:33:27 +11:00
lib Swapped run_all for reload. 2011-10-17 14:33:27 +11:00
spec Swapped run_all for reload. 2011-10-17 14:33:27 +11:00
.gitignore Swapped run_all for reload. 2011-10-17 14:33:27 +11:00
.travis.yml fix travis.yml 2011-06-06 15:02:32 -04:00
Gemfile clean up rake and gem files 2011-08-04 11:31:42 -04:00
Guardfile add deamonize option and start some tests 2011-06-01 10:06:35 -04:00
README.md update docs 2011-09-14 14:06:07 -04:00
Rakefile clean up rake and gem files 2011-08-04 11:31:42 -04:00
guard-rails.gemspec add deamonize option and start some tests 2011-06-01 10:06:35 -04:00

README.md

Build Status

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!

  • :port is the port number to run on (default 3000)
  • :environment is the environment to use (default development)
  • :start_on_start will start the server when starting Guard (default true)
  • :force_run kills any process that's holding open the listen port before attempting to (re)start Rails (default false).
  • :daemon runs the server as a daemon, without any output to the terminal that ran guard (default false).
  • :timeout waits this number of seconds when restarting the Rails server before reporting there's a problem (default 20).
  • :server lets 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.