Hi, something has been checked into Rails edge recently, something I to do with the new dependencies system I suspect, that completely breaks the loading of one of the plugins I''m working on, the unobtrusive_javascript plugin (though I don''t think this is isolated to our plugin - see the comments on http://weblog.rubyonrails.org/ 2006/8/11/reloading-revamped/). The plugin''s init.rb requires all of the necessary files, one of which is vendor/plugins/unobtrusive_javascript/lib/ unobtrusive_javascript.rb - this file contains a module called UnobtrusiveJavascript. This module contains a method which needs to be used in the routes.rb file, UnobtrusiveJavascript::routes. This worked fine before. However it fails to work and I get the following strange error: Expected /Users/luke/Sandbox/projects/rails_plugin_repository/ config/../vendor/plugins/unobtrusive_javascript/lib/ unobtrusive_javascript.rb to define UnobtrusiveJavascript The problem doesn''t seem to be related to the method being called in routes - if I remove the line it fails to find the apply_behaviour method which is in PLUGIN_ROOT/lib/unobtrusive_javascript/helpers.rb, inside a module called UnobtrusiveJavascript::Helpers. These helpers are injected in the init.rb file: ActionController::Base.send(:helper, UnobtrusiveJavascript::Helpers) Again this did use to work. Is there something wrong with my code - is there something I need to update? Or is this a bug in the new dependencies mechanism? Cheers Luke Redpath www.lukeredpath.co.uk
Francois Beausoleil
2006-Aug-16 20:27 UTC
Re: Problems with new dependency code and plugins
Hello Luke, 2006/8/16, Luke Redpath <contact@lukeredpath.co.uk>:> Expected /Users/luke/Sandbox/projects/rails_plugin_repository/ > config/../vendor/plugins/unobtrusive_javascript/lib/ > unobtrusive_javascript.rb to define UnobtrusiveJavascriptI get the same kind of error in the test environment: Expected D:/wwwroot/cn.staging.teksol.info/app/models/email_activity.rb to define ::EmailActivity The file looks like: class EmailActivity < Activity ... end Nothing earth shattering here. All my other tests pass. This exception is raised an integration test. This is on Rails r4777. Bye ! -- François Beausoleil http://blog.teksol.info/ _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
Julian ''Julik'' Tarkhanov
2006-Aug-18 15:22 UTC
Re: Problems with new dependency code and plugins
On 16-aug-2006, at 22:27, Francois Beausoleil wrote:>> Expected /Users/luke/Sandbox/projects/rails_plugin_repository/ >> config/../vendor/plugins/unobtrusive_javascript/lib/ >> unobtrusive_javascript.rb to define UnobtrusiveJavascriptMoreover, I get the following error in my test environment: LoadError: Expected /Sites/mizmor/app/models/magazine.rb to define Magazine After I check, it happens because I got the following at the start of magazine.rb: require_dependency ''feature'' This probably raises, but Dependencies fails to report that there is a problem with this statement, so the error messgae is somewhat misleading. I would appreciate to get the original exception up the stack to know where to dig. -- Julian ''Julik'' Tarkhanov please send all personal mail to me at julik.nl