Skip to content

Instantly share code, notes, and snippets.

@hamin
Created April 16, 2011 21:52
Show Gist options
  • Save hamin/923537 to your computer and use it in GitHub Desktop.
Save hamin/923537 to your computer and use it in GitHub Desktop.
How to get replica sets to work with MM...just use the Ruby driver!!!!!
# In your config/initializers/mongo.rb where you initialize your connection with Mongo:
MongoMapper.connection = Mongo::Connection.multi([["db3", 27017], ["db3", 27018]])
# of course you can read the replica set info from a simple YAML file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment