title: Unable to access library files from controller in rails
body: <p>I have created a new library file <code>sampler.rb</code> inside the lib folder. Consider this as the content of the file</p>
  
  <pre><code>module Sampler
      def sample_tester
          "test"
      end
  end
  </code></pre>
  
  <p>I have included it in the application_controller and added a require statement in the <code>config\initializers</code>. When I try to access the method sample_tester from my controllers, I get the following error</p>
  
  <pre><code>undefined local variable or method `sample_tester` for #&lt;BlogsController:0xb8fbac8&gt;
  </code></pre>
  
  <p>Am I missing something? </p>