views:

150

answers:

2

I have a app that I'm deploying to a development server using Capistrano. I'd like to force this deployment to use the development database. So far the only way I've managed to do it is to make my production database info in database.yml equal to the development info. But this is a complete hack.

I've tried setting rails_env to development in deploy.rb but that hasn't worked.

Thoughts?

+2  A: 

I'd use Capistrano Ext in order to define multiple deployment environments. I have used this in the past to deply staging and production installations of my apps, so I think it'd work well for you.

Jamis Buck has a writeup if you'd like an overview on how to use it.

Mr. Matt
+3  A: 

I ended up using the solution over here. Basically a recipe to replace a line in environment.rb after deploy but before restart.

The problems seems to be with DreamHost's Passenger config. It assumes you're running in production mode.

Owen