How do you list all of the autoload paths in Rails?
In Rails console when I do this, it only lists the custom paths added to the config:
$ rails c
Loading development environment (Rails 3.2.9)
1.9.3p194 :001 > MyRailsApp::Application.config.autoload_paths
=> []
Update: please see Laura’s answer using ActiveSupport::Dependencies.autoload_paths below. I’ve left this answer here as an alternate method.
In
Rails::Enginewhich is included in the Rails application’s module, there is the following method:So, you could either do:
or:
or just:
The default result in Rails 3.2.9 is:
This should include all the autoload paths that were added by other gems and custom load paths.