theforeman/foreman · error · PluginNotFound

%{id} plugin requires the %{plugin_name} plugin, not found

Error message

%{id} plugin requires the %{plugin_name} plugin, not found

What it means

Error "%{id} plugin requires the %{plugin_name} plugin, not found" thrown in theforeman/foreman.

Source

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

    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

    # Adds an item to the given menu
    # The id parameter is automatically added to the url.
    #   menu :menu_name, :plugin_example, 'menu text', { :controller => :example, :action => :index }
    #
    # name parameter can be: :top_menu or :admin_menu
    #
    def menu(menu, name, options = {})
      options[:parent] = @parent if @parent
      Menu::Manager.map(menu).item(name, options)
    end

View on GitHub (pinned to 6b05625475)

When it happens

Trigger: Thrown at app/registries/foreman/plugin.rb:234 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/3900f4314f3344e7. Report an issue: GitHub.