Is it just me (don''t just answer "yes" :-) - or is there an inconsistency in the way, that you specify the running environment for command-line Rails scricts? If e.g. I want to run the console in production-mode, I would write: script/console production If running a migration, I need to write it like: RAILS_ENV=production rake db:migrate I know, that "rake" is not a part of the Rails framework, but then why is there another convention for the console/server scripts? - Carsten -- 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Mar-06 10:05 UTC
Re: Inconsistent specification of prod/dev environment
On 6 Mar 2008, at 10:03, Carsten Gehling wrote:> > Is it just me (don''t just answer "yes" :-) - or is there an > inconsistency in the way, that you specify the running environment for > command-line Rails scricts? > > If e.g. I want to run the console in production-mode, I would write: > > script/console production > > If running a migration, I need to write it like: > > RAILS_ENV=production rake db:migrate > > > I know, that "rake" is not a part of the Rails framework, but then why > is there another convention for the console/server scripts? >You can write RAILS_ENV=production script/console It''s just not very nice. Fred> - Carsten > -- > 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 -~----------~----~----~----~------~----~------~--~---
Carsten Gehling
2008-Mar-06 10:14 UTC
Re: Inconsistent specification of prod/dev environment
Frederick Cheung wrote:> You can write RAILS_ENV=production script/console > It''s just not very nice.Oh... I should have checked that before posting - sorry :-) I went the other way - I got used to using "script/console production", and then later discovered that this didn''t work in "rake". - Carsten -- 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 -~----------~----~----~----~------~----~------~--~---