Hi James, Can you check which versions of Rails/Ruby/Engines plugin you're using? If you can also give a listing of your load paths (i.e. the output of "puts $LOAD_PATH", "puts Dependencies.load_paths" and "puts ActionController::Routing.controller_paths"), it would help me track down what the issue might be.
- James On 12/15/06, James Nelson <[EMAIL PROTECTED]> wrote: > I was having a bit of trouble on the latest edge rails with my controllers > not being loaded, so I made a few changes to engines.rb in the engines > plugin directory. Basically, on the last three references to $LOAD_PATH, I > added a line afterwards doing exactly the same thing with > Dependencies.load_paths: > > # add these LAST on the load path. > load_paths.reverse.each { |dir| > if File.directory?(dir) > Engines.log.debug "adding #{File.expand_path(dir)} to the load > path" > #$LOAD_PATH.push(File.expand_path(dir)) > $LOAD_PATH.push dir > Dependencies.load_paths.push dir > end > } > > # Add the other engines back onto the bottom of the $LOAD_PATH. Put > them back on in > # the same order. > $LOAD_PATH.push(*old_plugin_paths) > Dependencies.load_paths.push(*old_plugin_paths) > $LOAD_PATH.uniq! > Dependencies.load_paths.uniq! > > I'm sure this is utterly awful code, but it was just a quick fix to get it > working, since I don't know if the problem was with engines, rails or me. > I'm not sure whether I was doing something wrong in the first place to make > it so my controllers could not be found. I do know that the Dependencies > module in active support didn't have the app directory for my engine in its > load path (the one I found by actually tracing the application's execution), > but by the same token, it _was_ in the application's load path earlier in > execution. The really weird things is the libs and models for my engine > _were_ loading fine when the controllers weren't. > > Also, I can't tell if it was working previously and changed with an update > to the latest rails, as I only just added the controllers to my application. > > -- > - James > _______________________________________________ > engine-users mailing list > engine-users@lists.rails-engines.org > http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org > > > -- * J * ~ _______________________________________________ engine-users mailing list engine-users@lists.rails-engines.org http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org