From: Paul Lutus Date: 2006-09-20T10:35:11+09:00 Subject: Re: Can not find superclass Yu Co wrote: / ... >> You haven't shown enough code. Does the Sub class file have this at the >> top: >> >> require 'super' > > That's all of the code I have. I have just two empty classes - one > should be the subclass and the other the superclass. > > After writing "require 'super'" at the top of the 'sub'file I get > "uninitialized constant ActiveRecord (NameError)" > > Odd, isn't ? Not, it's not odd, it means that, because you put "require 'super'" at the top of the sub class file, the sub class found the super class, and you now have an new problem. The new problem is the absence of: require 'activerecord' at the top of the super class file. Before, the sub class couldn't find a definition for 'super'. Now super can't find a definition for 'activerecord'. Each Ruby source file that requires information from outside itself ... must say so. -- Paul Lutus http://www.arachnoid.com