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.