I disagree that Rails should come with a staging environment by default,
even that for the past year I have had staging environments for all my
applications as a default when they're not in Heroku. In that case, I tend
to use environment variables to define different settings for both
production and staging, but load them both as being in a production
environment.

One catch Rodrigo mentioned is the log level for production being hardcode
for a 'production' environment. I see a benefit for most developers who
just copy production.rb to staging.rb having an :info log level being
explicitly set on production.rb by default.

On Sat, Apr 14, 2012 at 09:12, Rodrigo Rosenfeld Rosas
<[email protected]>wrote:

>  Hi Robert, that is exactly what I'm currently doing, but I was also
> afraid about the default "production" environment in passenger settings, so
> I renamed my production environment to prod.
>
> That is why I wrote this thread in the first place to note that the
> log_level option should not be commented in the production.rb template file
> because it will default to 'info' only if your environment is called
> 'production'.
>
> Also, I did symlink prod.rb to qa.rb.
>
> I read that keeping the settings in a separate recipe is a better idea but
> what I didn't see are the reasons why is that. Why would it increase
> security for example?
>
> Also, adding a staging server is much easier than setting up a Chef
> recipe, and I already know Chef:
>
> https://github.com/rosenfeld/gitorious-cookbooks
>
> And I've been using the manual procedure for handling my production and
> staging environment for years without trouble, so I don't think that
> automatic management is a must. I'm not saying it is not useful, indeed it
> is great to have such feature, but it is just not that much required. If
> you don't feel the need, why bothering about it?
>
> Cheers,
> Rodrigo.
>
> Em 13-04-2012 19:17, Robert Pankowecki escreveu:
>
> Or you can just symlink staging.rb to production.rb. But I would never
> risk a mistake coming from fact that the entry in my database.yml for
> staging would be called production.
>
> Robert Pankowecki
>
>
>
>  --
> 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.
>

-- 
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