mongo.rb:1: uninitialized constant MongoMapper (NameError) that’s the error i get on my config/initializers/mongo.rb file.
i follwed the config tutorial from the http://www.mongodb.org website
that’s the code in mongo.rb file
MongoMapper.connection = Mongo::Connection.new(‘localhost’, 27017)
MongoMapper.database = “#monmil-#{Rails.env}”
if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
MongoMapper.connection.connect if forked
end
end
thanks in advance
The initializer is no longer needed. That tutorial is outdated. Read the docs on http://mongomapper.com/