Forum: Rails deployment authentic staging environment

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Cb69cf9c53d60467ae45479b85cb59d9?d=identicon&s=25 Zac Z. (zaczheng)
on 2009-12-09 14:14
I want to create an authentic staging environment where it will function
precisely as it does in the production environment.

Given some plugins, e.g. asset packager, will behave differently if it's
not in 'production' environment, I figure it's best to run the staging
server in 'production' as well, rather than creating a new 'staging'
environment. Is this the correct way of doing this?

If so however, the staging server does need a slightly different
configuration in order to communicate differently to the email server. I
am having difficulty thinking of a way of doing this if they are both in
'production' environment.

I thought perhaps I could set another variable in mod_rails which can be
picked up in Rails. Though having scanned the documentation nothing
obvious sticks out.

Any advice is greatly appreciated.
1cee0a9c7789c89ff05d3a019617ff08?d=identicon&s=25 Max W. (max-williams)
on 2009-12-18 17:43
A staging site is a very good idea: however you should have it on a
different server with the same setup as your production server, since
you're inevitable going to be stopping and restarting it a lot and this
will affect the performance of your live site (not to mention make it
break completely when you restart nginx/apache/whatever) if they're
sitting on the same box.  It should run in production as you say.
Cb69cf9c53d60467ae45479b85cb59d9?d=identicon&s=25 Zac Z. (zaczheng)
on 2009-12-19 16:30
Thanks for the reply. They are indeed on separate servers.

I ended using these environment names:
development_server - to differentiate from 'development' which is used

I added 'staging' to merged_environments for asset_packager so that it
merges asset files(js/css) on 'staging', using this:

Synthesis::AssetPackage.merge_environments = ["staging", "production"]
This topic is locked and can not be replied to.