How to get database.yml configuration to use it in a rake ta

Hello,

I want to get the production environment configuration from the

database.yml in the /shared folder of a deployed rails application. I
could use scp to get the file, write it to temporary file, read it and
open it with YAML, but is there a better way to do this?

Best regards,


Aníbal Rojas

You can get at the configurations with
ActiveRecord::Base.configurations, which is a hash where each key is
the environment name and which maps to a hash of the configuration
options (i.e. hostname, port, username, password, etc.)

V/r
Anthony EDen

On 12/23/06, [email protected] [email protected] wrote:


Aníbal Rojas
http://www.rubycorner.com
http://www.hasmanydevelopers.com


Cell: 808 782-5046
Current Location: Melbourne, FL