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.

Plugin Loader lists all plugins as missing when only one is missing

#1921

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

Reported by Oshoma · February 9th, 2009 @ 04:07 PM

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

Activity

  1. Oshoma
    Oshoma
    • 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.

    February 9th, 2009 @ 04:11 PM

  2. Repository
    Repository
    • 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 Plugin Loader lists all plugins as missing when only one is missing state:committed] http://github.com/rails/rails/co...

    February 13th, 2009 @ 09:32 AM