`load_missing_constant': uninitialized constant Rails::Generator (NameError)

Hello,
I’m probably missing something pretty basic here as a rails newbie
but
I’m trying to write a plugin and I am trying to get my generator to
work.

I am trying to call the manifest method in my
vendor/plugins/media_module/generators/media_module_generator.rb from my
vendor/plugins/media_module/init.rb.

here’s the code in vendor/plugins/media_module/init.rb:

require File.join(File.dirname(__FILE__),
'/generators/media_module_generator')
media_mod_generatore = MediaModuleGenerator.new
media_mod_generatore::manifest()

and here’s my code in
vendor/plugins/media_module/generators/media_module_generator.rb:

class MediaModuleGenerator < Rails::Generator::NamedBase
  def manifest
    record do |m|
      m.file "media_controller.rb", 
"app/controllers/media_controller.rb"
      m.file "media.rb", "app/models/media.rb"
    end
  end
end

When I restart my server I get this:
`load_missing_constant’: uninitialized constant Rails::Generator
(NameError)

Thanks,
Clem C

View this message in context:
http://www.nabble.com/`load_missing_constant'%3A-uninitialized-constant-Rails%3A%3AGenerator-(NameError)-tp23495870p23495870.html
Sent from the RubyOnRails Users mailing list archive at Nabble.com.