I have a module in my Rails app that lives in /lib
module MyModule mattr_accessor :the_variable class << self def setup yield this end
In your environment file before referencing MyModule, use require to load the file.
require 'my_module'
this bypasses the dynamic dependency loading mechanism.