{"record":{"id":"789a65e9304d2c39","repo":"puppetlabs/puppet","slug":"gem-not-found-gem-name","errorCode":null,"errorMessage":"Gem not found '%{gem_name}'","messagePattern":"Gem not found '%(.+?)'","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/pops/loader/gem_support.rb","lineNumber":49,"sourceCode":"    unless spec\n      raise ArgumentError, _(\"Gem not found %{uri}\") % { uri: uri }\n    end\n\n    # if path given append that, else append given subdir\n    if uri.path.empty?\n      spec.gem_dir\n    else\n      File.join(spec.full_gem_path, uri.path)\n    end\n  end\n\n  # Produces the root directory of a gem given as a string with the gem's name.\n  # TODO: FIND by name raises exception Gem::LoadError with list of all gems on the path\n  #\n  def gem_dir_from_name(gem_name)\n    spec = Gem::Specification.find_by_name(gem_name)\n    unless spec\n      raise ArgumentError, _(\"Gem not found '%{gem_name}'\") % { gem_name: gem_name }\n    end\n\n    spec.full_gem_path\n  end\nend\n","sourceCodeStart":31,"sourceCodeEnd":55,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/loader/gem_support.rb#L31-L55","documentation":"Error \"Gem not found '%{gem_name}'\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/pops/loader/gem_support.rb:49 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":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}