Broken Build when not using ActiveRecord?

Just a quickie.

I ran into this problem before, then forgot about it after finding the solution. Then one of my colleagues ran into the same problem today which prompted me to post this.

If you’re rails app doesn’t use ActiveRecord you may find yourself scratching your head wondering why your build fails with ActiveRecord related problems. I obseverd this even though I had turned off ActiveRecord in my environment.rb. CruiseControl.rb still tried to run rake tasks like test:db:purge etc.

The quick and easy solution is to remove database.yml from your config directory. CruiseControl.rb should ignore any database related rake tasks then.

2 thoughts on “Broken Build when not using ActiveRecord?

  1. Hi,

    The *right* solution is to define ‘cruise’ task in your Rakefile (or lib/tasks) and make it dependent on all the right steps. Or write something like:

    project.rake_task = ‘test’

    in cruise_config.rb

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>