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 and does the hard work for us. This is an example on how to hook your own mechanism:
-
Copy the 2_file_watcher.rb file below to lib/file_watcher.rb
-
Add the following inside your Application in config/application.rb
require "file_watcher" config.file_watcher = FileWatcher
-
Add "fssm" to your Gemfile
-
Profit!