I'm seeing the same thing. It happens in tests. Also happens on 1.2.1. Works fine in RC2 and 1.1.6.
This seems to be related to referring to the class in question from
environment.rb . Commenting out the sections of custom code in
environment.rb solves the problem, but now parts of the rest of the app
don't work anymore since certain things weren't setup right in
environment.rb. Any suggestions would be appreciated.
I see a different error when trying to start the server, but commenting
out the same lines in environment.rb fixes that too.
I've noticed that my problem with loading models is only in the
development environment. Specifically, if I turn on the caching of
loaded classes in config/environments/development.rb
(config.cache_classes = true) my problem goes away. (Not really since
it I want to not cache the classes in dev.)
Is your problem occuring regardless of the cache setting? Or does the
cache setting impact what occurs?
per Alan's reply, I added a few strategic requires and that seems to
have greatly improved the situation. Server starts now, but now there
are other errors indicating I still have more to do. Thanks all for the
assistance. I think I can take it from here.
As posted to this list a while back, I'm currently soliciting feedback
on the upcoming 1.2 release of the engines plugin, which is compatible
with Rails 1.2. The "official" release (the one you get at the moment
when running script/plugin install engines) is NOT compatible.
You can find the current 1.2 release branch at http://svn.rails-
engines.org/engines/branches/rb_1.2 - checkout this code into vendor/
plugins for a 1.2-compatible version of the engines plugin.
You should also be aware that until the "datebocks" plugin is updated
to be compatible with the engines 1.2 release, it will (probably) not
work properly.