I''m trying to call a Model class within a lib/ module with no success. Here''s what I''m working with: ======================= lib/Import_Foo.rb =====================require "pp" module Import_Foo def Import_Foo.import_database barmodel = BarModel.find_all() end module ForeignTables #Unimportant stuff in here end end ======================end lib/foo_module.rb =================== When I try to run "Foo_Module.import_database" in the console, I get this error: NameError: uninitialized constant BarModel BarModel was constructed with the model generator. Any ideas? I feel like I''m just not referencing BarModel correctly. Should it Models::BarModel or something? Thanks in advance! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---