views:

36

answers:

3

I am trying to create a new environment(build) for using it with hudson...

Am doing this because i didn't want to mix up my test databases with hudson test database..

Thanks in advance..

+2  A: 

This Railscast has the details.

John Topley
+2  A: 

Assuming you want create the hudson environment.

  1. Create a new environment file in config/environments/hudson.rb. You can start by cloning an existing one, for instance config/environments/test.rb.
  2. Add a new configuration block in config/database.yml for your environment.
  3. That's all.

Now you can start the server

ruby script/server -e hudson

Run the console

ruby script/server hudson

And so on.

Simone Carletti
shouldn't it be `config/environments/hudson.rb`?
neutrino
neutrino is right...
ZX12R
Fixed, thank you.
Simone Carletti
A: 

Create a file config/environments/build.rb which will contain the options specific to your environment.
Add your new environment's database credentials in config/database.yml.

Rock and roll!

Damien MATHIEU