Skip to content
This repository has been archived by the owner on Aug 18, 2018. It is now read-only.

Latest commit

 

History

History
22 lines (13 loc) · 1.77 KB

README.markdown

File metadata and controls

22 lines (13 loc) · 1.77 KB

This plugin is no longer maintained since Rails no longer supports plugins (just gems). If you are interested in updating / taking this over, please open an issue.

In rails apps, it is considered a good practice to not include config/database.yml under version control. Developers might have different settings, ie someone prefers mysql, or postgres, or even sqlite3. It's also bad to have production passwords in it, so many projects will copy an appropriate database.yml in at deploy time.

So if database.yml isn't in version control, then where is it?

wheres-your-database-yml-dude answers this question. It hooks into rails' rake tasks to make sure a database.yml when its needed. Additionally, if you have a config/database.yml.example, it'll copy that in place for you.

To get started, go something like this (assuming you are using git, and have database.yml checked in currently):

script/plugin install git://github.com/technicalpickles/wheres-your-database-yml-dude
git mv config/database.yml config/database.yml.example
${EDITOR} config/database.yml.example # make it nice and clean, and free of passwords
echo config/database.yml >> .gitignore
git add vendor/plugins/wheres-your-database-yml-dude .gitignore config
git commit -m "Where's your database.yml, dude?"