Don’t name a capistrano namespace “rake”. This breaks the db:migrate task, or any other built-in task that tries to run a rake command. You’ll get a message like this:
executing "cd (your deployment directory) && #<Capistrano::Configuration::Namespaces::Namespace:0x107e01908> RAILS_ENV=production db:migrate"
This error occurs with Capistrano 2.9, but does not occur with 2.5 - I’m not going to bother tracking down the exact version that introduced this issue.