{"record":{"id":"92bbaf68a589f10e","repo":"ytti/oxidized","slug":"nokogiri-not-found-sudo-gem-install-nokogiri","errorCode":null,"errorMessage":"nokogiri not found: sudo gem install nokogiri","messagePattern":"nokogiri not found: sudo gem install nokogiri","errorType":"exception","errorClass":"Oxidized::OxidizedError","httpStatus":null,"severity":"error","filePath":"lib/oxidized/model/panos_api.rb","lineNumber":16,"sourceCode":"# PanOS API-based model for Oxidized\n#\n# The API-based model produced an XML configuration file that can actually be\n# restored as a configuration backup. Make sure to use the \"http\" input for\n# this module.\n\nbegin\n  # Nokogiri is required because the PanOS API, as well as the\n  # configuration file format uses XML. It is required to parse API\n  # responses, as well as to pretty-print the configuration XML file\n  # when saving it.\n  require 'nokogiri'\nrescue LoadError\n  # Oxidized itself depends on mechanize, which in turn depends on\n  # nokogiri, so this should never happen.\n  raise Oxidized::OxidizedError, 'nokogiri not found: sudo gem install nokogiri'\nend\n\nclass PanOS_API < Oxidized::Model # rubocop:disable Naming/ClassAndModuleCamelCase\n  using Refinements\n\n  # Callback function for getting the configuration file.\n  cfg_cb = lambda do\n    url_param = URI.encode_www_form(\n      user:     @node.auth[:username],\n      password: @node.auth[:password],\n      type:     'keygen'\n    )\n\n    kg_r = get_http \"/api?#{url_param}\"\n\n    # Parse the XML API response for the keygen request.\n    kg_x = Nokogiri::XML(kg_r)\n","sourceCodeStart":1,"sourceCodeEnd":34,"githubUrl":"https://github.com/ytti/oxidized/blob/687ed4262d9d21e54662e872e2383386d8498f7b/lib/oxidized/model/panos_api.rb#L1-L34","documentation":"Error \"nokogiri not found: sudo gem install nokogiri\" thrown in ytti/oxidized.","triggerScenarios":"Thrown at lib/oxidized/model/panos_api.rb:16 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"687ed4262d9d21e54662e872e2383386d8498f7b","analyzedAt":"2026-08-23T11:19:42.084Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}