Reloading Rails Directories: Not Lib!
- by yar
I have checked out several questions on this, including all of those you see next to the question. Unfortunately, I'm not working with a plugin, and I don't want to work in lib.
I have a directory called File.join(Rails.root, 'classes') and I'd like the classes in this directory to reload automatically in dev. In my environment.rb I have this line
config.load_paths << File.join(Rails.root, 'classes')
which works fine and blows up if the path isn't there. The reloading line in my development.rb also works fine
require_dependency File.join(Rails.root, 'classes', 'blah.rb')
which blows up if the file is not there (a good sign).
However, the file doesn't reload.
This all works if the file is in the root of lib and I use the require_dependency line, but my whole point is to get stuff out of lib as suggested here.