theforeman/foreman · error · PluginRequirementError

%{id} plugin requires Foreman %{matcher} but current is %{cu

Error message

%{id} plugin requires Foreman %{matcher} but current is %{current}

What it means

Error "%{id} plugin requires Foreman %{matcher} but current is %{current}" thrown in theforeman/foreman.

Source

Thrown at app/registries/foreman/plugin.rb:224

    def logger(name, configuration = {})
      @logging.add_logger(name, configuration)
    end

    def <=>(plugin)
      id.to_s <=> plugin.id.to_s
    end

    def to_s
      "Foreman plugin: #{id}, #{version}, #{author}, #{description}"
    end

    # Sets a requirement on Foreman version
    # Raises a PluginRequirementError exception if the requirement is not met
    # matcher format is gem dependency format
    def requires_foreman(matcher)
      current = SETTINGS[:version].notag
      unless Gem::Dependency.new('', matcher).match?('', current)
        raise PluginRequirementError.new(N_("%{id} plugin requires Foreman %{matcher} but current is %{current}" % {:id => id, :matcher => matcher, :current => current}))
      end
      true
    end

    # Sets a requirement on a Foreman plugin version
    # Raises a PluginRequirementError exception if the requirement is not met
    # matcher format is gem dependency format
    def requires_foreman_plugin(plugin_name, matcher, allow_prerelease: true)
      plugin = Plugin.find(plugin_name)
      raise PluginNotFound.new(N_("%{id} plugin requires the %{plugin_name} plugin, not found") % {:id => id, :plugin_name => plugin_name}) unless plugin
      dep_checker = Gem::Dependency.new('', matcher)
      dep_checker.prerelease = true if allow_prerelease
      unless dep_checker.match?('', plugin.version)
        raise PluginRequirementError.new(N_("%{id} plugin requires the %{plugin_name} plugin %{matcher} but current is %{plugin_version}" % {:id => id, :plugin_name => plugin_name, :matcher => matcher, :plugin_version => plugin.version}))
      end
      true
    end

View on GitHub (pinned to 6b05625475)

When it happens

Trigger: Thrown at app/registries/foreman/plugin.rb:224 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of theforeman/foreman@6b05625475 (2026-08-23). Data as JSON: /api/errors/a6ba6f2eb15e0ac9. Report an issue: GitHub.