Skip to content

Instantly share code, notes, and snippets.

@bernardobarreto
Last active November 20, 2017 09:55
Show Gist options
  • Select an option

  • Save bernardobarreto/eced2ed75f7c597e98e82ca03c6d8424 to your computer and use it in GitHub Desktop.

Select an option

Save bernardobarreto/eced2ed75f7c597e98e82ca03c6d8424 to your computer and use it in GitHub Desktop.
Mongoid: two databases yml sharded configuration
production:
sessions:
default:
database: db_development
username: my_username
password: my_password
hosts:
- myserverip:27017
secondary:
database: db2_development
username: myusername2
password mypassword2
hosts:
- myserverip2:27018
- myserverip3:27018
options:
connection: :sharded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment