refinery/refinerycms · error · ArgumentError

A plugin MUST have a name!: #{plugin.inspect}

Error message

A plugin MUST have a name!: #{plugin.inspect}

What it means

Error "A plugin MUST have a name!: #{plugin.inspect}" thrown in refinery/refinerycms.

Source

Thrown at core/lib/refinery/plugin.rb:11

module Refinery
  class Plugin

    attr_accessor :name, :class_name, :controller, :directory, :url,
                  :always_allow_access, :menu_match, :hide_from_menu,
                  :pathname

    def self.register(&_block)
      yield(plugin = new)

      raise ArgumentError, "A plugin MUST have a name!: #{plugin.inspect}" if plugin.name.blank?

      # Set defaults.
      plugin.menu_match ||= %r{refinery/#{plugin.name}(/.+?)?$}
      plugin.always_allow_access ||= false
      plugin.class_name ||= plugin.name.camelize

      # add the new plugin to the collection of registered plugins
      ::Refinery::Plugins.registered.unshift(plugin).uniq!(&:name)
    end

    # Returns the internationalized version of the title
    def title
      ::I18n.translate(['refinery', 'plugins', name, 'title'].join('.'))
    end

    # Returns the internationalized version of the description
    def description
      ::I18n.translate(['refinery', 'plugins', name, 'description'].join('.'))

View on GitHub (pinned to 34438aae76)

When it happens

Trigger: Thrown at core/lib/refinery/plugin.rb:11 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/472102600e04de57. Report an issue: GitHub.