Clem Rock
2009-May-12 04:01 UTC
`load_missing_constant'': uninitialized constant Rails::Gener
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: [code] require File.join(File.dirname(__FILE__), ''/generators/media_module_generator'') media_mod_generatore = MediaModuleGenerator.new media_mod_generatore::manifest() [/code] and here''s my code in vendor/plugins/media_module/generators/media_module_generator.rb: [code] 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 [/code] When I restart my server I get this: `load_missing_constant'': uninitialized constant Rails::Generator (NameError) Thanks, Clem C -- Posted via http://www.ruby-forum.com/.