From: Tony Arcieri Date: 2009-06-16T04:27:21+09:00 Subject: ActiveSupport "is not missing constant" errors --0016369fa259e3e7e7046c680b42 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I've gone spelunking through ActiveRecord's dependencies.rb until my eyes bleed, and I'm still yet to understand what causes these errors and how can they can be prevented. As far as I can tell, ActiveSupport's const_missing callback is triggered. ActiveSupport then attempts automatic code loading, only to discover that the constant is, in fact, already defined. I am specifically encountering this problem trying to use a dependency-resolving code loader: http://github.com/tarcieri/require_all/tree/master I've encountered this problem using Merb's code loader as well (albeit outside of Merb). Merb's code loader works in the same way so I'm wondering if this issue comes up with Merb as well. In the latest case, the code loads in through the code loader correctly, however when it tried to access a particular constant in a method body, the error is generated, even though the class has been loaded. This doesn't even happen consistently either: it is happening on one of my coworker's computers (and only his computer, even though his setup is virtually identical to our CI server). Also, it occurs only when the full Rails environment is loaded, not in unit tests. *sigh* This has been a perpetual thorn in my side for over a year. I really have to wonder? 1) What does this "error" really mean? 2) Why is it an error? 3) Why can't ActiveSupport handle it internally? 4) What am I expected to do in order to fix it? -- Tony Arcieri medioh.com --0016369fa259e3e7e7046c680b42--