New Environment?


#1

Hello all,
I was wondering if it is possible to create a new environment? IE I
want a fourth environment set called Stage. The reason being is that
we want to run a staging server of sorts. This server will run a copy
of our app that is rebuilt via switchtower every hour. We don’t want
it to run in as test we want it to run as a production environment
but some of our classes rely on a variable set in the environments/
environment.rb (where the second environment is either test,
development, or production) file specific to the server they are
running on. We have a different variable set for production,
development, and test and would like to add the new environment
called stage.rb. Is it as easy as creating a new database definition
in the yml file called stage, and adding in a stage.rb file. Or is it
more difficult than that? Obviously we would tell lighty what
environment it is supposed to load.

Thanks for the help.

Andrew


#2

On 24/02/06, Andrew F. removed_email_address@domain.invalid wrote:

development, and test and would like to add the new environment
called stage.rb. Is it as easy as creating a new database definition
in the yml file called stage, and adding in a stage.rb file. Or is it
more difficult than that? Obviously we would tell lighty what
environment it is supposed to load.

It is just as simple as you say. Just make a copy of one of the files
in config/environments with a new name, provide additional entry in
database.yml. and make sure that RAILS_ENV has new value.