All the Rake tasks in vendor/plugins are loaded, even if there's an explicit list in config.plugins in environment.rb. I expected that if a plugin isn't included it config.plugins, its Rake tasks aren't loaded, either.
I ran into this when I deployed to a staging server and ran db:migrate. The project includes a few plugins (rails_rcov, html_test) that depend on gems not installed on the server. I don't really want to install rcov, etc. on my staging and production servers.
Ideally, rails/lib/tasks/rails.rb would honor Configuration#plugins instead of just globbing vendor/plugins///tasks//.rake.
Can't say that I fully understand Rails configuration and initialization, but it looks as if we would need to basically bootstrap Rails to get a proper list of plugins, and then load the Rake tasks. Seems like over-kill given that many Rake tasks don't need Rails bootstrapped.
For anyone interested, I worked around this by adding a Capistrano deploy:after_update hook that deletes the unwanted plugins. Brutal, but it works. I considered doing something trickier with SVN, but I prefer that developers can just 'svn co' and have a running application.