Thanks for all the pointers, Pascal. After reading the thread I now think that the problem is simply in my testcase as it's based my former assumption that the plugin's load_paths should appear in the order in that they were loaded/ initialized.
Am 02.12.2007 um 21:45 schrieb Pascal: > > On Dec 2, 2007, at 12:17 PM, Sven Fuchs wrote: > >> Woha, folks, I appologize for the awkward formatting of my last >> mail ... I shouldn't have just pasted the text from Textmate :( >> >> Am 02.12.2007 um 21:04 schrieb Pascal: >>> On Dec 2, 2007, at 8:06 AM, Sven Fuchs wrote: >>>> >>>> * $LOAD_PATH seems to be in reverse order so tests fail here (tests >>>> disabled) >>> Did you follow this discussion on >>> http://groups.google.com/group/rubyonrails-core/browse_thread/thread/5f17c2a87a122613#320622ec48b0129a >>> ? >> >> Not quite. I was aware that it's there ... but I haven't been able to >> really follow it. I'll try to catch up on that. >> >>> What's the cause of the failure? >> >> I'm not sure, yet. It might be caused by my own changes to Engines, >> some changes from Rails 1.2 to Rails 2.0 RC1 (which I used) or even a >> bug in my testcases. >> >> I'm not even totally sure if I really understand how things are >> supposed to work here. >> >> Can you give me a recap? > Comments 11 Pascal and 13 James Adam should give you an idea of > what's going on and possible issues with that. Basically, > $LOAD_PATH is in reverse order to give plugins initialized later > more weight. The problem is that if the path to a file is used more > than once, the first one gets totally hidden. > > Possible solutions to ensure a plugin loads its code and nothing > else in the load path: > > - use absolute paths init.rb to require all the files > require File.join(File.dirname(__FILE__), 'lib/filtered_column/ > processor') > require File.join(File.dirname(__FILE__), 'lib/filtered_column/mixin') > require File.join(File.dirname(__FILE__), 'lib/filtered_column/ > filters/base') > require File.join(File.dirname(__FILE__), 'lib/filtered_column/ > macros/base') > > - insert your lib in front of everyon in init.rb > $:.unshift(File.dirname(__FILE__) + '/lib') > > the second solution is easier, but can introduce a whole new set of > loading problems for other plugins since you are changing the load > path. > > Cheers, > Pascal. > -- > http://blog.nanorails.com > > >> >> >> -- >> sven fuchs [EMAIL PROTECTED] >> artweb design http://www.artweb-design.de >> grünberger 65 + 49 (0) 30 - 47 98 69 96 (phone) >> d-10245 berlin + 49 (0) 171 - 35 20 38 4 (mobile) >> >> >> >> _______________________________________________ >> Engine-Developers mailing list >> [email protected] >> http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org > > _______________________________________________ > Engine-Developers mailing list > [email protected] > http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org -- sven fuchs [EMAIL PROTECTED] artweb design http://www.artweb-design.de grünberger 65 + 49 (0) 30 - 47 98 69 96 (phone) d-10245 berlin + 49 (0) 171 - 35 20 38 4 (mobile) _______________________________________________ Engine-Developers mailing list [email protected] http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org
