Request Database Authentication When Rails Starts
Derek (usernamed perraultd) shows us how to rewrite your Rails application's database.yml file to manually prompt you for database authentication information when your Rails app starts. This might not be of much use in automated deployment environments, but it demonstrates the dynamism of the templating system (I didn't even realize database.yml was processed in this way).
January 26, 2007 at 8:20 pm
I am astonished.
This new info on yaml processing will open a bunch of possibilities.
Extremely interesting.
January 26, 2007 at 11:02 pm
The manual prompt wouldn't work too hot for automated deployments, but if you decrypt a hashed password in database.yml, that would work.
I just needed something very lightweight, but like Dejan Dimic said, there's a bunch of possibilities. :)
January 27, 2007 at 9:24 am
Wow...
But, being on the negative side, I can see automatically processing files using ERB (or anything that can "run code") without explicit request may be a... security concern. (for some people)