UNMAINTAINED A small Rails plugin to answer the question of "Where's your database.yml, dude?"
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tasks
README.markdown

README.markdown

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?"