views:

292

answers:

2

I have several properties that are dependent on the environment the application is running. For example, there are links to another application that is being developed concurrantly that get displayed in the header and footer. I want those links to be different depending on what environment they are in.

This is slightly different than the way we use the out of box enviornment configuration files because our system administrator has mongrel running in 'Production' mode even on the development server. I only run mongrel in 'Development' mode on my laptop.

Is there a standard way for handling situations like this? Or should we run mongrel in "Development" mode on the dev server and so on up the line. In that case, what happens if have an extra level in our env hierarchy. (Dev, Test, UAT, Production)

+2  A: 

You can go with a custom config file. Check out this thread.

webmat
+1  A: 

Running in production mode on UAT is definitely correct, you want that to work as closely to production as possible.

I assume the test server is not a server where you run CI on the project test suite but more some kind of integration server where people from inside the team can test new features before the users get their hands on it: this is more of a mixed case, but I would probably have it run in dev mode actually if only for the clearer error messages and improved logging (a lot of bugs are bound to be found there and you will want maximum information)

I guesse the dev server is some kind of integration server for the devs themselves,here again, running it in dev mode would probably be more beneficial with regard to the errors raised and logs.

As for the answer to your specific question I would definitely have a look at the thread mentionned by @webmat since you should find your answer there and you could also have a look here

Jean