Forum: Ruby on Rails config.plugins doesn't work

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
19c9af375aca3001e3978cb16684803c?d=identicon&s=25 Parker Thompson (Guest)
on 2007-05-15 23:45
(Received via mailing list)

I see references to using config.plugins like so:

config.plugins = [

in the engines and appable plugins worlds (et al).  Reading the
code I just can't see how this would work, and in fact it doesn't for me
(nor does my lame hack [1]),. Can anyone tell me how I might tell the
initializer to load plugin A, then B, then everything else?




config.plugins = [
    ] +,
"./vendor/plugins").collect do |path|
    path.gsub!(/^.+\/(.+)$/, '\1')
Ba3a00606eb530dcab2c4a6a59bf366d?d=identicon&s=25 Alain Ravet (Guest)
on 2007-05-16 02:11
(Received via mailing list)

   > I see references to using config.plugins like so:

I don't know about the Engine way to handle this, but in standard Rails
I use
to tell Rails where to find extra plugins.

For example, I move all my development-only plugins to a separate

, and I link to it by adding
   config.plugin_paths.push('vendor/plugins-development' ).uniq!
in development.rb

more details here:

Alain Ravet
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2007-05-23 22:41
(Received via mailing list)
The engines plugin overrides the default Rails initializer code to
achieve this. You can see the code in the following files:

In the "vanilla" rails, there's no way to say "load A, then B, then
everything else in any order", which is why I had to implement it
myself. Hooking into the initializer is tricky from a plugin (since
you're overriding the very mechanism that's loading your changes), but
if you spend some time looking at the engines plugin code you should
be able to figure out which parts I needed to change.

This topic is locked and can not be replied to.