But I think that having a staging environment is also pretty common and
a good default and I'd ask you to also include this environment by default.
Also, I'd like to suggest a change in the production.rb template:
# See everything in the log (default is :info)
# config.log_level = :debug
This shouldn't be commented. Here is the reason:
find . -name '*.rb' | xargs grep Rails.env.production | grep log
./railties/lib/rails/application/configuration.rb: @log_level ||=
Rails.env.production? ? :info : :debug
So, if you decide to copy your production.rb settings to staging.rb
you'll have a surprise when you see different logs.
Does it make sense?
--You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.To post to this group, send email to rubyonra...@googlegroups.com.To unsubscribe from this group, send email to rubyonrails-co...@googlegroups.com.For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
That way you'd need an extra backup (aside from your git repository) for
storing each environment data, unless you're using something like
Capistrano or Chef. But setting up such environments when you're
starting your application may seem like overkill.
Rodrigo.
Also, unless your Chef recipes or Capistrano files are under version
control, you'd lose the environment setting changes over the time in
case you'd need to understand how it was configured in certain date.
Robert Pankowecki
I'm not sure if including a copy of the production.rb file is particularly informative - I'd say the reason for the three we have at present is to offer an example of various categories of environment, each of which requires a particular clump of settings.
The log_level issue does seem relevant, though - maybe the conditional could be inverted to "not development or test"?
--Matt Jones
I'd just prefer that log_level was present (uncommented) in all
environments by default, being 'debug' in test and development and
'info' on production.