Hello RoR Developers,
do you know how can I change the directory of database.yml. I want to
call it from another directory, and also want to reach the directory
name like #{RAILS_ROOT}
thanks for any commend and help..
--
Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Try:
Rails::Initializer.run do |config|
config.database_configuration_file = File.join(RAILS_ROOT,
"anotherdir", "database.yml")
end
On Wed, Feb 27, 2008 at 4:11 PM, Ibrahim Dogru <
rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:
>
> Hello RoR Developers,
>
> do you know how can I change the directory of database.yml. I want to
> call it from another directory, and also want to reach the directory
> name like #{RAILS_ROOT}
>
> thanks for any commend and help..
> --
> Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
sishen wrote:> Try: > > Rails::Initializer.run do |config| > config.database_configuration_file = File.join(RAILS_ROOT, > "anotherdir", "database.yml") > end > > > On Wed, Feb 27, 2008 at 4:11 PM, Ibrahim Dogru <thank you very much... -- Posted via http://www.ruby-forum.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---