title: Generator not working in gem
body: <p>I have a problem when creating a generator inside a gem. When I run <code>rails g</code> the generator is shown:</p>
  
  <pre><code>Supportator:
    supportator:initializer
  </code></pre>
  
  <p>But when I run the generator with <code>rails generate supportator:initializer</code> the following error occurs:</p>
  
  <pre><code>Could not find generator supportator:initializer.
  </code></pre>
  
  <p>This is the code of the generator:</p>
  
  <pre><code>require 'rails/generators'
  
  module Supportator
    class InitializerGenerator &lt; Rails::Generators::Base
      source_root File.expand_path("../templates", __FILE__)
  
      def create_initializer_file
        copy_file '_browser_validator.html.haml', 'app/views/_browser_validator.html.haml'
        copy_file 'en_supportator.yml' , 'config/locales/en_supportator.yml'
        copy_file 'es_supportator.yml' , 'config/locales/es_supportator.yml'
      end
  
    end
  end
  </code></pre>
  
  <p>This is the code of the engine:</p>
  
  <pre><code>module Supportator
    require 'rails'
    class Engine &lt; ::Rails::Engine
    end
  end
  </code></pre>
  
  <p>Do you know why this is happening?</p>