Const_missing & undefined method problems upgrading to Rails

Finally getting around to upgrading our application to Rails 1.1.2.

Of course, nothing runs correctly after the upgrade. So far two major
perhaps related. Any help would be greatly appreciated.

  1. We’re getting const_missing errors. Specifically when trying to use
    constants in a custom helper method, being called from a layout
    template. The
    class constants were for controller classes (but not the current
    Rails 1.0 (and previous) used to just find and load these automatically,
    1.1.2 throws an error.

The weird thing is that it apparently only does this on some of the
classes that are being referenced; the others load fine. I’ve checked
that the
class name to file name conversion via #demodulize.underscore seems to
work OK.

Did a little bit of debugging in active_support/dependencies.rb
Module#const_missing (where the error occurs). It appears that other
failures are being solved by the ‘Attempt to access the name from the
bit of code, but not this one.

I fixed this one with a brute force approach at the beginning of the
require “#{RAILS_ROOT}/app/controllers/*”
but I’d rather not do that.

  1. Now I’m getting ‘undefined method’ errors from my templates
    (specifically in
    a template rendered from within another template, but not a partial).
    methods in question are in a helper file that is included into

In fact, it appears that none of the methods in my application_helper.rb
available in my view object (as listed by self.methods.sort.inspect).
ApplicationHelper module, and any modules that should be included in it,
are not
shown as ancestors in the template either

Weirdly, the layout uses (different) methods from application_helper and
included modules without any problems whatsoever.

Maybe I was playing fast & loose with previous versions of Rails, but I
this upgrade was supposed to be painless.

Any ideas, suggestions, etc?

Thanks, Kian