When running rake db:migrate, how do you control which environment gets migrated? Running it without options always updates the development database. This is obviously not what I want to do on the production server. Thank you, Landon --~--~---------~--~----~------------~-------~--~----~ 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 Wed, 2007-06-06 at 17:35 +0000, Landon wrote:> When running rake db:migrate, how do you control which environment > gets migrated? Running it without options always updates the > development database. This is obviously not what I want to do on the > production server. >RAILS_ENV=production rake db:migrate Whammo. -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.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 -~----------~----~----~----~------~----~------~--~---
Thank you! So the next question is, where is that in the documentation? On Jun 6, 10:39 am, Matthew Beale <mixo...-8rZIAEcCR/xWk0Htik3J/w@public.gmane.org> wrote:> On Wed, 2007-06-06 at 17:35 +0000, Landon wrote: > > When running rake db:migrate, how do you control which environment > > gets migrated? Running it without options always updates the > > development database. This is obviously not what I want to do on the > > production server. > > RAILS_ENV=production rake db:migrate > > Whammo. > > -- > Matthew Beale :: 607 227 0871 > Resume & Portfolio @http://madhatted.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 -~----------~----~----~----~------~----~------~--~---
On Wed, 2007-06-06 at 17:48 +0000, Landon wrote:> Thank you! > > So the next question is, where is that in the documentation? >Dunno, it''s been a while since I had to look that one up :-). It works for almost everything. Rails looks to the RAILS_ENV env variable to set it''s mode. You can do the same with: RAILS_ENV=production script/console or a script/server, or a bunch of other little things. -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.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 -~----------~----~----~----~------~----~------~--~---
RAILS_ENV=production rake db:migrate Michael On Jun 6, 10:35 am, Landon <landon9...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> When running rake db:migrate, how do you control which environment > gets migrated? Running it without options always updates the > development database. This is obviously not what I want to do on the > production server. > > Thank you, > Landon--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---