I just released rerun 0.7. It now uses the Listen library which uses
your OS’s built-in filesystem change monitoring features so CPU use is
much more efficient.
Source and docs:
gem install rerun
rerun ruby my_sinatra_app.rb
rerun --dir config rails s
rerun -cx rake test
Rerun launches your program, then watches the filesystem. If a
relevant file changes, then it restarts your program. Rerun works for
both long-running processes (e.g. apps) and short-running ones (e.g.
tests). It’s basically a no-frills command-line alternative to Guard,
Shotgun, Autotest, etc. that doesn’t require config files and works on
any command, not just Ruby programs.
See the README at http://github.com/alexch/rerun for many more examples.