On Feb 11, 2006, at 5:18 AM, Stefan Arentz wrote:

> anibalrojas / gmail.com writes:
>
>> Using a DataSource (like in J2EE) you will still need to store the
>> password in the DS definition... Any pool conexion based system will
>> need a password.
>
> Most app servers or frameworks like Spring allow you to
> use placeholders in configuration files. Like
>
>  <property name="password" value="${my.password}"/>
>
> and then simply start the app with -Dmy.password=g3h31m

You can do this with Rails too.

The database.yml file can have ERB escapes in it, so you can set your  
password to <%= ... whatever ... %>.  You could have the Ruby code  
inside read an environment variable, for example, then just set the  
variable when you invoke.

James Edward Gray II