If you don't want to commit sensitive info to your database.yml file, don't use your database.yml file. Instead set an environment variable with DATABASE_URL=yourconnectionstring
This is supported on Rails 4.0 as far as I know, if you run into problems message me, I'll be happy to take a look. In general ask yourself, "can I open source my project if I really wanted to right now without opening up a giant security flaw". If the answer is no, put whatever sensitive data opens that flaw into an environment variable and then have your ruby code read from that variable like: ENV["DATABASE_URL"]. In development i use Foreman and a .env file for sensitive credentials. In production you could use the same, put it in your bash files, or use config vars if you're using Heroku. Related: http://www.12factor.net/config -- Richard Schneeman http://heroku.com @schneems (http://twitter.com/schneems) On Friday, October 5, 2012 at 11:54 AM, Robert Evans wrote: > It's a pretty common practice (and best practice) to not include your > config/database.yml file inside your git repo. I'd like to add > config/database.yml to the generated .gitignore file when creating a new > rails application. Any objects, concerns, etc. before I got submit a PR? > > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-core/-/g1IXETeCZEEJ. > To post to this group, send email to rubyonrails-core@googlegroups.com > (mailto:rubyonrails-core@googlegroups.com). > To unsubscribe from this group, send email to > rubyonrails-core+unsubscr...@googlegroups.com > (mailto:rubyonrails-core+unsubscr...@googlegroups.com). > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.