Life In The Stack Trace...

TODO: <Insert clever marketing phrase here>

Determine Rails Autoload Paths

Determining the autoload path for your app at runtime is pretty simple.

Create a Rails app.

rails new test.com --skip-bundle

Edit config/application.rb and add the lib directory to the autoload paths.

# config/application.rb
config.autoload_paths += %W(#{Rails.root}/lib)

Fire up the Rails console

rails c

At the prompt, type:

TestCom::Application.config.autoload_paths

If you created your rails app in the /tmp directory, then, you should see something like the following:

["/tmp/test.com/lib"]

It will work in any Rails environment: test, development, production.