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

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.
Sven F. (Guest)
on 2007-12-09 16: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      removed_email_address@domain.invalid
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.