[Rails] Plugin Loading Changes

James Adam james.adam at gmail.com
Fri Dec 16 15:02:02 GMT 2005


This was a problem that we hit with engines too - essentially you
can't control the plugin load order. I think this is probably suits
the Rail's core team philosophy, which I believe to be that plugins
shouldn't depend on other plugins (correct me if this isn't accurate).

For some history:
http://dev.rubyonrails.org/ticket/2723
http://dev.rubyonrails.org/ticket/2757

... and this is exactly why there is an Engines.start command too.
With some kind of plugin dependency mechanism it would be obsolete.

- james

On 12/7/05, Jeremy Evans <jeremyevans0 at gmail.com> wrote:
> On 12/7/05, Jeremy Kemper <jeremy at bitsweat.net> wrote:
> > Lib dirs are added before any inits are called in 1.1.
> > Could you try on svn trunk?
>
> I did rake freeze_edge and tried:
>
> # in specific_plugin/init.rb
> require 'general_plugin'
> require 'specific_plugin'
>
> and this:
>
> # in specific_plugin/init.rb
> load_plugin 'general_plugin'
> require 'specific_plugin'
>
> Both of which failed. I checked the load path and not all plugin lib
> directories are in it when it loads specific_plugin/init.rb.
>
> This still worked:
>
> # in specific_plugin/init.rb
> load_plugin File.join(RAILS_ROOT, 'vendor', 'plugins', 'general_plugin')
> require 'specific_plugin'
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


More information about the Rails mailing list