On Apr 13, 2012, at 4:00 PM, Rodrigo Rosenfeld Rosas wrote:

> Rails is well known for having good conventions and defaults. So it comes 
> pre-configured with 3 common environments: development, test and production.
> 
> 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?

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

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to