No commit activity in last 3 years
No release in over 3 years
This gem provide capistrano Tasks for the database.yml file in deployments of rails applications.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Rails database.yml tasks for Deployment with Capistrano

This gem provide some Capistrano tasks to handle a database.yml file dynamically on the deployment server.

As you now, it is a bad idea to check the database credentials into the source control for security reasons.

So this gem provides a way to create and handle a shared database.yml file for you on your deployment servers. With this gem you don't need anymore to checkin a database.yml file with all the secrets of your database servers.

Usage

Add the gem to your Rails 3 Project that uses Bundler

gem "rails_database_yml"

Use Bundler to install the gem

bundle install

Require the capistrano tasks in your config/deployment.rb

require "rails_database_yml/capistrano"

That's all.

How it works

This gem asks you in cap deploy:setup for all necessery parameters for your database connection. Afters this it creates a database.yml file in the folder shared/config.

On every cap deploy the gem creates a symlink to the shared database.yml under current/config. So your rails application has always a database.yml file that is always the same between all deployments.