clem_c_rock
2009-May-12 04:12 UTC
`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: [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 -- View this message in context: http://www.nabble.com/%60load_missing_constant%27%3A-uninitialized-constant-Rails%3A%3AGenerator-%28NameError%29-tp23495870p23495870.html Sent from the RubyOnRails Users mailing list archive at Nabble.com.