Rails lib includes

include, ruby-on-rails

Solution

Adding `require 'lib/test_module'` at the top of your ApplicationController file might help

Problem

I have a puzzling issue regarding modules defined in the lib dir I have two files ``` #lib/authentication.rb module Authentication end #lib/test_module.rb module TestModule end ``` In my application controller I have ``` class ApplicationController < ActionController::Base include Authentication include TestModule end ``` The Authentication Module loads properly but the TestModule does not I get "uninitialized constant ApplicationController::TestModule" I am stumped... anyone? EDIT: Does anyone know where I could look to debug this?

Original source

Related problems