adubrock / PDX911Calls

Logs the Police calls in Portland so residents can search them.
0 stars 4 forks source link

clean up config/database.yml. #9

Closed botandrose closed 10 years ago

botandrose commented 10 years ago

Hey folks, note that usernames, passwords, and other secrets should never be checked into version control. Normally you .gitignore this file, but in this case we don't need to because:

1) postgres will attempt to connect using your current username if none is provided, so we can leave username blank and password blank, and it should work on all dev machines. neat!

2) heroku doesn't use this file, so we don't need to specify the production password, or even the production environment at all!

So here is your clean new config/database.yml, safe to keep in version control.

P.S. don't worry about what &TEST means for now, but you don't need it. :)

adubrock commented 10 years ago

Thanks, Micah! That's very cool that postgres will just sub in current user name and password. We were a little confused as to why git was wanting to push/pull the database.yml file from both of us, bc we both have it on the .gitignore file….I found something about renaming the file and using 'where's your database.ymlm dude?' but didn't quite get to the root of why git wasn't ignoring it….

botandrose commented 10 years ago

Whoa, you're right, config/database.yml is definitely in your .gitignore. My guess is that that file was checked into version control before the entry was added to the .gitignore file. I don't think .gitignore will ignore files that already exist.