You shouldn't be doing this. database.yml
doesn't belong in version control, see How to manage Rails database.yml.
You should be storing a template file (I use config/database.yml.example
) and each person who clones your app should copy the template file to config/database.yml
, and add to it their existing database user and password, for connecting to their local development instance of Postgres.
Your designers should also have a single development user on their local machines, and it's up to them to place their credentials into config/database.yml
.
There is no way to have Rails create database users for you, because it's supposed to be your job to tell Rails existing database user it should use. All your apps, in your development environment, should be using the same user.