How do you configure apache on red hat linux ''the proper way'' for production? There''s an intriguing line in config/envinronment.rb: # Uncomment below to force Rails into production mode when # you don''t control web/app server and can''t set it the proper way ENV[''RAILS_ENV''] ||= ''production'' I''ve spent most of the day looking for this ''proper way''. Can any guide me to this mysterious place? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I believe it is necessary to modify the config/envinronment.rb file by uncommenting "ENV[''RAILS_ENV''] ||= ''production''" line, unless you use Webrick. Then you can specify the environment by typing "ruby/script server -e production". -- 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 -~----------~----~----~----~------~----~------~--~---
Thank you! BTW, where did you find that documented? Kris On Apr 12, 5:21 pm, Ryan <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I believe it is necessary to modify the config/envinronment.rb file by > uncommenting "ENV[''RAILS_ENV''] ||= ''production''" line, unless you use > Webrick. Then you can specify the environment by typing "ruby/script > server -e production". > > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---
To do the migration, you don''t need to edit the environment files at all. Otherwise you''ll be editing those on both your dev & prod environments with every deploy (which is a BadThing®). Instead, you can run your migration on the production database by calling rake db:migrate RAILS_ENV=production. For quick testing you can even use script/console production. When you start your server you pass it the environment flag (works for webbrick, mongrel, etc) Cheers, Niels On Apr 17, 2007, at 11:10 PM, Skrinak wrote:> > Thank you! > > BTW, where did you find that documented? > > Kris > > On Apr 12, 5:21 pm, Ryan <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> I believe it is necessary to modify the config/envinronment.rb >> file by >> uncommenting "ENV[''RAILS_ENV''] ||= ''production''" line, unless you use >> Webrick. Then you can specify the environment by typing "ruby/script >> server -e production". >> >> -- >> Posted viahttp://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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---