module ActiveSupport::Dependencies::ModuleConstMissing

def guess_for_anonymous(const_name)

top-level constant.
conventions and therefore we assume that the user wants to refer to a
that defines the constant. Anonymous modules cannot follow these
(unless it can be proven that is not the case) and the path to the file
We assume that the name of the module reflects the nesting
def guess_for_anonymous(const_name)
  if Object.const_defined?(const_name)
    raise NameError.new "#{const_name} cannot be autoloaded from an anonymous class or module", const_name
  else
    Object
  end
end