Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Plugins' Rake tasks loaded regardless of config.plugins

#856

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.

Reported by Scott Willson · August 18th, 2008 @ 11:49 PM

State: wontfix
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. josh
    josh
    • State changed from new to wontfix

    Seems like something worth committing it you can put together a patch.

    November 22nd, 2008 @ 06:59 PM