Skip to content

Instantly share code, notes, and snippets.

@brianhempel
Created February 21, 2011 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianhempel/837945 to your computer and use it in GitHub Desktop.
Save brianhempel/837945 to your computer and use it in GitHub Desktop.
Don't need much to get MM running
# ENV['MONGOHQ_URL'] = 'mongodb://localhost/sushi'
MongoMapper.database = "mes-#{Rails.env}"
# if ENV['MONGOHQ_URL']
# MongoMapper.config = {RAILS_ENV => {'uri' => ENV['MONGOHQ_URL']}}
# MongoMapper.connect(RAILS_ENV)
# end
if Rails.env == "development"
MongoMapper.connection = Mongo::Connection.new('localhost', 27017, :logger => Rails.logger)
require 'mm_logged_time'
MongoMapper.logged_time_level = Logger::DEBUG
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment