I use the following line in an initializer to autoload code in my /lib
directory during development:
config/initializers/custom.rb: >
Though this does not directly answer the question, but I think it is a good alternative to avoid the question altogether.
To avoid all the autoload_paths
or eager_load_paths
hassle, create a "lib" or a "misc" directory under "app" directory. Place codes as you would normally do in there, and Rails will load files just like how it will load (and reload) model files.