Skip to content

Instantly share code, notes, and snippets.

@moneill
Created June 2, 2011 19:28
Show Gist options
  • Save moneill/1005105 to your computer and use it in GitHub Desktop.
Save moneill/1005105 to your computer and use it in GitHub Desktop.
Sample mongoid.yml generated from rails g mongoid:config (app name is 'appy')
defaults: &defaults
host: localhost
# slaves:
# - host: slave1.local
# port: 27018
# - host: slave2.local
# port: 27019
development:
<<: *defaults
database: appy_development
test:
<<: *defaults
database: appy_test
# set these environment variables on your prod server
production:
host: <%= ENV['MONGOID_HOST'] %>
port: <%= ENV['MONGOID_PORT'] %>
username: <%= ENV['MONGOID_USERNAME'] %>
password: <%= ENV['MONGOID_PASSWORD'] %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment