anibalrojas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Dec-24 02:00 UTC
How to get database.yml configuration to use it in a rake taks
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
http://www.rubycorner.com
http://www.hasmanydevelopers.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Anthony Eden
2006-Dec-31 01:02 UTC
Re: How to get database.yml configuration to use it in a rake taks
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, anibalrojas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <anibalrojas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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 > http://www.rubycorner.com > http://www.hasmanydevelopers.com > > > > >-- Cell: 808 782-5046 Current Location: Melbourne, FL --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Reasonably Related Threads
- logger anybody?
- Trouble defining a stub method for a controller
- annotate_models plugin to annotate RSpec specs and fixture
- Windows, Segmentation Faults, config.load_paths and config.cache_classes
- How to spec routes for a resource nested in multiples resources?