title: Name error uninitialized constant module rails
body: <p>I have a rails application in that I have modules inside <code>/app/adapters/UDB/</code> folder. The module is not loading. I have added the following in <code>application.rb</code></p>
  
  <p><code>config.autoload_paths += Dir["#{config.root}/app/adapters/**/*"]</code> </p>
  
  <p>I am calling module from model file <code>/models/userinvite.rb</code>  </p>
  
  <pre><code>   def update_cassandra
      ypusers = UDB::YpRewards.new.ypusers
      ypusers.execute("UPDATE invitation_backlog SET invitation_code = '#{invitation_code}', invitation_sent_date = #{invitation_sent_date.to_i * 1000}, invited_by = '#{invited_by}' WHERE email_address = '#{email}'")
     end
  </code></pre>
  
  <p>/app/adapters/UDB/yp_rewards.rb</p>
  
  <pre><code>   module UDB
     class YpRewards
       def initialize
  
       end
       def ypusers
          @ypusers ||= UDB::Connection.new.connection.connect('ypusers')
       end
     ...
  </code></pre>
  
  <p>Please help me solving it.</p>