title: Heroku ActionController::RoutingError (uninitialized constant error)
body: <p>Rails 4.2.4, Ruby 2.1.7</p>
  
  <p>I have a module inside lib/ directory.</p>
  
  <p>lib/BLL/user_feed.rb</p>
  
  <pre><code>module BLL
   class UserFeed
  
      def initialize
          logger.debug "Class has been initialized"
      end
  
      def get_user_feed(user_id)
        # logic here
  
          return {
           # object
          }
      end
   end
  end
  </code></pre>
  
  <p>When I try to include that in my controller to use my user_Feed logic, </p>
  
  <pre><code> class UserfeedController &lt; ApplicationController
    include BLL
  
   before_action :authenticate_user!
  
    def show
     # some logic
    end
  end
  </code></pre>
  
  <p>In my config/application.rb</p>
  
  <pre><code>config.autoload_paths &lt;&lt; Rails.root.join('lib')
  </code></pre>
  
  <p><strong>This runs fine locally, however, it breaks when I deploy it on Heroku.</strong></p>
  
  <p>it's throwing </p>
  
  <p><strong>ActionController::RoutingError (uninitialized constant UserfeedController::BLL):</strong></p>
  
  <p>error.</p>
  
  <pre><code>2015-10-20T13:45:13.791457+00:00 app[web.1]: /app/app/controllers/api/v1/userfeed_controller.rb:1:in `&lt;top (required)&gt;': uninitialized constant Bll (NameError)
  2015-10-20T13:45:13.791457+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
  2015-10-20T13:45:13.791458+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/engine.rb:471:in `each'
  2015-10-20T13:45:13.791459+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/engine.rb:471:in `block in eager_load!'
  2015-10-20T13:45:13.791460+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/engine.rb:469:in `each'
  2015-10-20T13:45:13.791462+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/engine.rb:469:in `eager_load!'
  2015-10-20T13:45:13.791463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.4/lib/rails/engine.rb:346:in `eager_load!'
  </code></pre>
  
  <p>Any suggestions?</p>
  
  <p><a href="https://i.stack.imgur.com/npIzJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/npIzJ.png" alt="enter image description here"></a></p>