{"record":{"id":"7a601f4bdb95cb55","repo":"refinery/refinerycms","slug":"engine-must-define-a-root-accessor-that-returns-a","errorCode":null,"errorMessage":"Engine must define a root accessor that returns a pathname to its root","messagePattern":"Engine must define a root accessor that returns a pathname to its root","errorType":"exception","errorClass":"InvalidEngineError","httpStatus":null,"severity":"error","filePath":"core/lib/refinery.rb","lineNumber":194,"sourceCode":"    private\n    def detect_invoker(the_caller = caller)\n      return '' unless the_caller && the_caller.respond_to?(:detect)\n      the_caller.detect{ |c| /#{Rails.root}/ === c }.inspect.to_s.split(':in').first\n    end\n\n    # plain Module#included? or Module#included_modules doesn't cut it here\n    def included_extension_module?(base, extension_module)\n      if base.kind_of?(Class)\n        direct_superclass = base.superclass\n        base.ancestors.take_while { |ancestor| ancestor != direct_superclass}.include?(extension_module)\n      else\n        base < extension_module # can't do better than that for modules\n      end\n    end\n\n    def validate_extension!(const)\n      unless const.respond_to?(:root) && const.root.is_a?(Pathname)\n        raise InvalidEngineError, \"Engine must define a root accessor that returns a pathname to its root\"\n      end\n    end\n  end\nend\n","sourceCodeStart":176,"sourceCodeEnd":199,"githubUrl":"https://github.com/refinery/refinerycms/blob/34438aae76d087246039cd24755187844d796737/core/lib/refinery.rb#L176-L199","documentation":"Error \"Engine must define a root accessor that returns a pathname to its root\" thrown in refinery/refinerycms.","triggerScenarios":"Thrown at core/lib/refinery.rb:194 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"34438aae76d087246039cd24755187844d796737","analyzedAt":"2026-08-23T06:03:41.094Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}