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

_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to