If "database.yml" is added to your git repository before you specify it in the ignore file, I think you should delete it:
git rm config/database.yml git commit -a -m "Removed database.yml"
Then add the database.yml file to your project, it will work fine.
Arun Kumar Kandasamy
source share