Based on what I read, database.yml has the config pointing to all 3 different environment. You can use rake to move the schema from one environment to another. How will the rails know it is running in development or testing or data center environment to use appropriate database ? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> Based on what I read, database.yml has the config pointing to all 3 > different environment. You can use rake to move the schema from one > environment to another. How will the rails know it is running in > development or testing or data center environment to use appropriate > database ?I think be default at the top of config/environment.rb there is a line that sets RAILS_ENV to development unless it''s already been set elsewhere in the environment. So by default you''re gonna end up in ''development''. Otherwise it depends on how you start up rails. Each web server has it''s own way of indicating the environment rails should start up in. And things like script/console and script/runner take the argument on the command line if you want to change it. -philip --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Jun 12, 11:43 am, Philip Hallstrom <r...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote:> > Based on what I read, database.yml has the config pointing to all 3 > > different environment. You can use rake to move the schema from one > > environment to another. How will the rails know it is running in > > development or testing or data center environment to use appropriate > > database ? > > I think be default at the top of config/environment.rb there is a line > that sets RAILS_ENV to development unless it''s already been set elsewhere > in the environment. > > So by default you''re gonna end up in ''development''. Otherwise it depends > on how you start up rails. Each web server has it''s own way of indicating > the environment rails should start up in. > > And things like script/console and script/runner take the argument on the > command line if you want to change it. > > -philipThanks for the information. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---