Forum: Ruby on Rails Moving to production

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
85850a2ef20780e6ca033c2fe1173cb0?d=identicon&s=25 Skrinak (Guest)
on 2007-04-13 01:59
(Received via mailing list)
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?
6a867819a874b2a6d0a06200a70cdfa5?d=identicon&s=25 Ryan (Guest)
on 2007-04-13 02:21
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".
85850a2ef20780e6ca033c2fe1173cb0?d=identicon&s=25 Skrinak (Guest)
on 2007-04-18 05:11
(Received via mailing list)
Thank you!

BTW, where did you find that documented?

Cde0427edc3138a49ec9f07a07b7079f?d=identicon&s=25 Niels Meersschaert (Guest)
on 2007-04-18 15:01
(Received via mailing list)
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)


This topic is locked and can not be replied to.