# Database.yml + CC.rb + Capistrano

**URL:** <https://www.ruby-forum.com/t/database-yml-cc-rb-capistrano/136521>\
**Category:** Deployment\
**Created:** [May 3, 2008, 12:35am UTC](https://www.ruby-forum.com/t/database-yml-cc-rb-capistrano/136521 "2008-05-03T00:35:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 3, 2008, 12:35am UTC](https://www.ruby-forum.com/t/database-yml-cc-rb-capistrano/136521/1 "2008-05-03T00:35:07Z")

</div>

So, I deploy my app with capistrano.

I’m trying to set up cc.rb to do it’s thing.

I use a capistrano task to generate my database.yml file (with erb) on  
cap deploy:setup (as per the rails way).

This leads to a /shared/config/database.yml and not any database.yml  
in my repository.

As such, CC.rb can’t find my database details when it goes to run the  
tests.

Anyone have a solution for this? I don’t know enough about CC.rb to  
figure out if there’s some sort of shared directory for it, or what’s  
going on.

Thanks,  
BJ Clark

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 3, 2008, 12:59am UTC](https://www.ruby-forum.com/t/database-yml-cc-rb-capistrano/136521/2 "2008-05-03T00:59:43Z")

</div>

On Fri, May 2, 2008 at 4:34 PM, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> As such, CC.rb can’t find my database details when it goes to run the  
> tests.  
> Anyone have a solution for this? I don’t know enough about CC.rb to  
> figure out if there’s some sort of shared directory for it, or what’s  
> going on.

Yup. As the documentation for CC.rb says, if default build behavior is  
not smart enough to do the right thing, don’t try to twist your  
environment around it, just give it a custom Rake task or build  
command for the project and bypass the default build behavior.

–  
Alexey V.  
CruiseControl.rb [[http://cruisecontrolrb.thoughtworks.com](http://cruisecontrolrb.thoughtworks.com)]  
RubyWorks [[http://rubyworks.thoughtworks.com](http://rubyworks.thoughtworks.com)]
