Rails 3.2 ships with a simple FileWatcher that only reloads your app if any of the files changed.
Besides, it also provides a mechanism to hook up your own file watcher mechanism, so we can use tools like FSSM that hooks into Mac OS X fsevents. This is an example on how to hook your own mechanism (you need Rails master, soon to be Rails 3.2):
1) Copy the
2_file_watcher.rb file below to
2) Add the following inside your Application in
if Rails.env.development? require "file_watcher" config.file_watcher = FileWatcher end
3) Add to your
group :development do gem "fssm" end
More information about this behavior can be read on ActiveSupport::FileUpdateChecker
Note: the approach in Rails is actually quite fast and it is actually quite fast and will probably be fine for all applications out there. In fact, if you are using Windows (or any operating system that does not have filesystem events supported by FSSM), the Rails implementation is even better as it is checks for timestamps just when required instead of having a pooling thread.