From: Gavin Kistner Date: 2006-09-21T01:55:27+09:00 Subject: Re: Can not find superclass > I defined two classes 'Super' und 'Sub' in two separate files > that look > like this: > > class Super < ActiveRecord::Base > end > > class Sub < Super > end > > After compiling 'Sub' I get the following error message > "uninitialized > constant Super (NameError)" I believe your problem is that, for each request, rails only loads the appropriate controller files. You need to put a 'require' or 'load' (or some rails-specific require command) in your second file to ensure that the controller file that you define Super in is being loaded (causing Super to be defined) before you attempt to use it.