The best way to set up a staging server is for it to be configured as close to 
production as possible, so I always run my staging server using the 
production.rb environment. If there are differences (like which S3 bucket to 
use), I put them in ENV settings or in files that aren't under version control. 
So I think having a staging.rb file is the wrong way to go.

I also always have a demo environment that is meant for feature acceptance, 
which is a different role than staging and often has different configuration. I 
think this is very common for projects that use agile where the PM does story 
acceptance. But I don't expect that to become standard in Rails. I think 
development, testing, and production are really the only ubiquitous 
environments I've seen, and are exactly the right set for Rails to include as 
standard. 

--
Josh Susser
http://blog.hasmanythrough.com


On Friday, April 13, 2012 at 1: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?
> 
> -- 
> 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 rubyonrails-core@googlegroups.com 
> (mailto:rubyonrails-core@googlegroups.com).
> To unsubscribe from this group, send email to 
> rubyonrails-core+unsubscr...@googlegroups.com 
> (mailto:rubyonrails-core+unsubscr...@googlegroups.com).
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-core?hl=en.
> 
> 


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

Reply via email to