refinery/refinerycms · error · InvalidEngineError
Engine must define a root accessor that returns a pathname t
Error message
Engine must define a root accessor that returns a pathname to its root
What it means
Error "Engine must define a root accessor that returns a pathname to its root" thrown in refinery/refinerycms.
Source
Thrown at core/lib/refinery.rb:194
private
def detect_invoker(the_caller = caller)
return '' unless the_caller && the_caller.respond_to?(:detect)
the_caller.detect{ |c| /#{Rails.root}/ === c }.inspect.to_s.split(':in').first
end
# plain Module#included? or Module#included_modules doesn't cut it here
def included_extension_module?(base, extension_module)
if base.kind_of?(Class)
direct_superclass = base.superclass
base.ancestors.take_while { |ancestor| ancestor != direct_superclass}.include?(extension_module)
else
base < extension_module # can't do better than that for modules
end
end
def validate_extension!(const)
unless const.respond_to?(:root) && const.root.is_a?(Pathname)
raise InvalidEngineError, "Engine must define a root accessor that returns a pathname to its root"
end
end
end
end
View on GitHub (pinned to 34438aae76)
When it happens
Trigger: Thrown at core/lib/refinery.rb:194 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of refinery/refinerycms@34438aae76 (2026-08-23).
Data as JSON: /api/errors/7a601f4bdb95cb55.
Report an issue: GitHub.