I have my Rails app in an Apache server. If i don’t use this app for a
while it goes very slow the first clic. After this first clic, it goes
very fast. I want the first response to be fast too.
My production.rb file is:
Settings specified here will take precedence over those in
config/environment.rb
In the development environment your application’s code is reloaded on
every request. This slows down response time but is perfect for
development
since you don’t have to restart the webserver when you make code
changes.
config.cache_classes = false
Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
config.action_view.cache_template_extensions = false
Don’t care if the mailer can’t send
config.action_mailer.raise_delivery_errors = true
set delivery method to :smtp, :sendmail or :test
config.action_mailer.delivery_method = :activerecord
these options are only needed if you choose smtp delivery
config.action_mailer.smtp_settings = {
:address => “…”,
:port => 25,
:domain => ‘…’,
:authentication => :login,
:user_name => “…”,
:password => ‘…’
}