This project is archived and is in readonly mode.

#856 ✓wontfix
Scott Willson

Plugins' Rake tasks loaded regardless of config.plugins

Reported by Scott Willson | August 18th, 2008 @ 11:49 PM | in 2.x

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.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages