I have (had!) a class BasicRecord that include Versionable and Linkable in modules called "versionable.rb" and "linkable.rb". The modules refer to another model class, Type in "type.rb".
All works fine in unit and functional tests, also in the script/console, but not with script/server where I get a stack dump indicating that "Linkable::Type" is an unknown Constant.
It doesn't help to "require 'type'" from linkable.rb. But doing so does move the stackdump to another place in the code that refers to Type.
I don't understand the loader enough to tackle this one. Hope it makes some kind of sense to someone out there. Workaround is to dump all my module code direct in the base class (which I don't especially like).