All Projects → technicalpickles → wheres-your-database-yml-dude

technicalpickles / wheres-your-database-yml-dude

Licence: other
UNMAINTAINED A small Rails plugin to answer the question of "Where's your database.yml, dude?"

Programming Languages

ruby
36898 projects - #4 most used programming language

Where's your database.yml, dude?

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?"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].