This project is archived and is in readonly mode.
Plugin Loader lists all plugins as missing when only one is missing
Reported by Oshoma | February 9th, 2009 @ 04:07 PM | in 2.x
The plugin loader raises a LoadError exception when a plugin requested in configuration.plugins cannot be loaded. This exception message currently lists all requested plugins, rather than just the subset of plugins which weren't loaded successfully.
Impact: the message is misleading. You know something didn't load, but you can't be sure what exactly went wrong.
Repro: delete a plugin directory from a Rails app that has several plugins. Then start the console or server and you'll get an error message like this: "Could not locate the following plugins: stubby, acts_as_chunky_bacon, non_existant_plugin1, and non_existant_plugin2". The message lists all plugins in the configuration.plugin statement, regardless of which ones were successfully loaded.
Versions: Rails 2.3.0 (same issue in 2.2.2) ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] psql (PostgreSQL) 8.3.5
Comments and changes to this ticket
-
Oshoma February 9th, 2009 @ 04:11 PM
- Tag changed from bug, initializer, loader, plugin to bug, initializer, loader, patch, plugin
Attaching a patch to Rails::Plugin::Loader along with a unit test.
-
Repository February 13th, 2009 @ 09:32 AM
- State changed from new to committed
(from [a6508527570cd3f7225a7030218447bcc5824224]) Fix loader's LoadError exception message to mention missing plugins and omit loaded plugins.
Prior to this change the LoadError message listed all plugins if any one of them was missing.
Signed-off-by: Michael Koziarski michael@koziarski.com [#1921 state:committed] http://github.com/rails/rails/co...
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
Attachments
Tags
Referenced by
- 1921 Plugin Loader lists all plugins as missing when only one is missing Signed-off-by: Michael Koziarski michael@koziarski.com [#...