Forum: Rails Engines development Model loading test and different load_paths orders

402602a60e500e85f2f5dc1ff3648ecb?d=identicon&s=25 Sven Fuchs (Guest)
on 2007-12-09 15:59
(Received via mailing list)
I think that I've found the problem that causes the last test in
model_and_lib_test.rb to fail.

The problem is: with two models Something present in two plugins
plugin_a and plugin_b the one in the latter plugin one should, but the
former one actually is loaded.

This only happens when one uses Dependency constant autoloading for
loading the class (as I did in the test). It doesn't happen when one
explicitely requires the file. This is because the plugin paths are
inserted into $LOAD_PATHS in reverse alphabetical order but appended
to Dependencies.load_paths in alphabetical order.

This behaviour seems to have around since at least Rails 1.2.x

I've also posted to the rails-core list:

sven fuchs
artweb design
gr├╝nberger 65    + 49 (0) 30 - 47 98 69 96 (phone)
d-10245 berlin    + 49 (0) 171 - 35 20 38 4 (mobile)
This topic is locked and can not be replied to.