ytti/oxidized · error · Oxidized::OxidizedError

nokogiri not found: sudo gem install nokogiri

Error message

nokogiri not found: sudo gem install nokogiri

What it means

Error "nokogiri not found: sudo gem install nokogiri" thrown in ytti/oxidized.

Source

Thrown at lib/oxidized/model/panos_api.rb:16

# PanOS API-based model for Oxidized
#
# The API-based model produced an XML configuration file that can actually be
# restored as a configuration backup. Make sure to use the "http" input for
# this module.

begin
  # Nokogiri is required because the PanOS API, as well as the
  # configuration file format uses XML. It is required to parse API
  # responses, as well as to pretty-print the configuration XML file
  # when saving it.
  require 'nokogiri'
rescue LoadError
  # Oxidized itself depends on mechanize, which in turn depends on
  # nokogiri, so this should never happen.
  raise Oxidized::OxidizedError, 'nokogiri not found: sudo gem install nokogiri'
end

class PanOS_API < Oxidized::Model # rubocop:disable Naming/ClassAndModuleCamelCase
  using Refinements

  # Callback function for getting the configuration file.
  cfg_cb = lambda do
    url_param = URI.encode_www_form(
      user:     @node.auth[:username],
      password: @node.auth[:password],
      type:     'keygen'
    )

    kg_r = get_http "/api?#{url_param}"

    # Parse the XML API response for the keygen request.
    kg_x = Nokogiri::XML(kg_r)

View on GitHub (pinned to 687ed4262d)

When it happens

Trigger: Thrown at lib/oxidized/model/panos_api.rb:16 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ytti/oxidized@687ed4262d (2026-08-23). Data as JSON: /api/errors/92bbaf68a589f10e. Report an issue: GitHub.