refinery/refinerycms · error · RuntimeError

Anything added to be called after_inclusion must be callable

Error message

Anything added to be called after_inclusion must be callable (respond to #call).

What it means

Error "Anything added to be called after_inclusion must be callable (respond to #call)." thrown in refinery/refinerycms.

Source

Thrown at core/lib/refinery/engine.rb:24

    #
    # Example:
    #   module Refinery
    #     module Images
    #       class Engine < Rails::Engine
    #         extend Refinery::Engine
    #         engine_name :images
    #
    #         after_inclusion do
    #           # perform something here
    #         end
    #       end
    #     end
    #   end
    def after_inclusion(&block)
      if block && block.respond_to?(:call)
        after_inclusion_procs << block
      else
        raise 'Anything added to be called after_inclusion must be callable (respond to #call).'
      end
    end

    # Specify a block of code to be run before the refinery inclusion step. See
    # Refinery::Core::Engine#refinery_inclusion for details regarding the Refinery
    # inclusion process.
    #
    # Example:
    #   module Refinery
    #     module Images
    #       class Engine < Rails::Engine
    #         extend Refinery::Engine
    #         engine_name :images
    #
    #         before_inclusion do
    #           # perform something here
    #         end
    #       end

View on GitHub (pinned to 34438aae76)

When it happens

Trigger: Thrown at core/lib/refinery/engine.rb:24 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/fb466d39de63cf25. Report an issue: GitHub.