Forum: Ruby on Rails production and development mode

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
661ae6e97d0e16c2af2aaf7d197e8387?d=identicon&s=25 Sijo k g (sijo)
on 2008-10-31 11:38
Hi
     I would like to know the basic difference in running an application
in development mode and production mode  like
  ./script/server     and
  ./script/server RAILS_ENV=production

Thanks in advance
Sijo
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-10-31 12:05
(Received via mailing list)
On 31 Oct 2008, at 10:38, Sijo Kg wrote:

>
> Hi
>     I would like to know the basic difference in running an
> application
> in development mode and production mode  like
>  ./script/server     and
>  ./script/server RAILS_ENV=production
>
Well at the very least it means the app uses the production database
instead of the development one (as dictated by database.yml).
It also means that config/environments/production.rb is loaded instead
of config/environments/development.rb
Some settings also have a different default (eg the logger level)

Fred
661ae6e97d0e16c2af2aaf7d197e8387?d=identicon&s=25 Sijo k g (sijo)
on 2008-10-31 12:49
Hi
   thanks for the reply..So is there large speed differnce in
development and production mode? Also to run my server in production
mode I have to do any of the below
./script/server RAILS_ENV=production or ./script/server -e production

Is that all done?Nothing other setup is needed?

Sijo
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-10-31 13:32
(Received via mailing list)
On 31 Oct 2008, at 11:49, Sijo Kg wrote:

>
> Hi
>   thanks for the reply..So is there large speed differnce in
> development and production mode?
Well it depends on the settings you have made. By default there is a
big difference because with the default settings your app's code is
reloaded on each request.

Fred
7a9e1795a7787d27b163f7d704c98e44?d=identicon&s=25 Dan Engle (Guest)
on 2008-10-31 16:15
(Received via mailing list)
Also, some plugins behave differently depending on the environment.
For example, the exception_notification plugin won't send you an email
you when an exception occurs if you're running in development mode,
but does in production mode.
7a9e1795a7787d27b163f7d704c98e44?d=identicon&s=25 Dan Engle (Guest)
on 2008-10-31 16:15
(Received via mailing list)
Also, some plugins behave differently depending on the environment.
For example, the exception_notification plugin won't send you an email
you when an exception occurs if you're running in development mode,
but does in production mode.
This topic is locked and can not be replied to.