From: "Iñaki Baz Castillo" Date: 2009-04-05T03:56:17+09:00 Subject: Re: Loading classes in order El Sábado 04 Abril 2009, Elias Orozco escribió: > The app I'm working on is an online editor where a user create classes > that connect to back-ends and fetch data. The users can create classes > and have them all in their personal folder (security issues with this > type of apps are high, I'm working on that too). So basically when the > user wants to initialize an object of a class that depends on another > one I don't want uninitialized constant errors. I could make require as > it is the way is intended to do as you say. But I have seen that when I > put all those classes in the rails lib folder, for example, they're all > loaded without problem when I initialize the server and I can make an > instance object of any class without any error. I want something like > that. Another approach would be loading first a file containing all the classes "declaration", this is: ---------- class AAA ; end class BBB ; end [...] ---------- and later load all the files with classes real "definition". Not sure if this option is suitable in your case however. -- Iñaki Baz Castillo