title: Making Engine: Lib class not found: unitialized constant (NameError)
body: <p>I'm build a gem and created: </p>
  
  <p>"/lib/gem_name/resource.rb"</p>
  
  <pre><code>module GemName
    class Resource
      def initialize
        # nothing
      end
    end
  end
  </code></pre>
  
  <p>and in "/lib/gem_name.rb"</p>
  
  <pre><code>require "gem_name/engine"
  
  module GemName
    def new_resource
      @resources &lt;&lt; GemName::Resource.new
    end
  end
  </code></pre>
  
  <p>in "/test/dummy/config/initializers/gem_name.rb"</p>
  
  <pre><code>GemName.new_resource
  </code></pre>
  
  <p>when I start console, show this message:</p>
  
  <p><code>unitialized constant GemName::Resource (NameError)</code></p>
  
  <p>I check gem_name.gemspec and its contents is:</p>
  
  <pre><code>$:.push File.expand_path("../lib", __FILE__)
  
  # Maintain your gem's version:
  require "gem_name/version"
  
  # Describe your gem and declare its dependencies:
  Gem::Specification.new do |s|
    s.name        = "gem_name"
    s.version     = GemName::VERSION
    s.authors     = ["TODO: Your name"]
    s.email       = ["TODO: Your email"]
    s.homepage    = "TODO"
    s.summary     = "TODO: Summary of GemName."
    s.description = "TODO: Description of GemName."
  
    s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"]
    s.test_files = Dir["test/**/*"]
  
    s.add_dependency "rails", "~&gt; 3.2.8"
    # s.add_dependency "jquery-rails"
  
    s.add_development_dependency "sqlite3"
  end
  </code></pre>
  
  <p>Environment spec:</p>
  
  <ul>
  <li>ruby 1.9.2 </li>
  <li>rails 3.2.8</li>
  </ul>