class Rails::Application
def add_lib_to_load_path! #:nodoc:
you need to load files in lib/ during the application configuration as well.
Rails application, you will need to add lib to $LOAD_PATH on your own in case
are changing config.root inside your application definition or having a custom
Notice this method takes into consideration the default root path. So if you
end
config.i18n.backend = MyBackend
require "my_backend" # in lib/my_backend
class MyApplication < Rails::Application
configuration.
allowing the developer to load classes in lib and use them during application
This method is called just after an application inherits from Rails::Application,
def add_lib_to_load_path! #:nodoc: path = config.root.join('lib').to_s $LOAD_PATH.unshift(path) if File.exists?(path) end