puppetlabs/puppet · error · ArgumentError
Gem not found %{uri}
Error message
Gem not found %{uri} What it means
Error "Gem not found %{uri}" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/pops/loader/gem_support.rb:32
# gemname as a string.
#
def gem_dir(uri_or_string)
case uri_or_string
when URI
gem_dir_from_uri(uri_or_string)
when String
gem_dir_from_name(uri_or_string)
end
end
# Produces the root directory of a gem given as an uri, where hostname is the gemname, and an optional
# path is appended to the root of the gem (i.e. if the reference is given to a sub-location within a gem.
# TODO: FIND by name raises exception Gem::LoadError with list of all gems on the path
#
def gem_dir_from_uri(uri)
spec = Gem::Specification.find_by_name(uri.hostname)
unless spec
raise ArgumentError, _("Gem not found %{uri}") % { uri: uri }
end
# if path given append that, else append given subdir
if uri.path.empty?
spec.gem_dir
else
File.join(spec.full_gem_path, uri.path)
end
end
# Produces the root directory of a gem given as a string with the gem's name.
# TODO: FIND by name raises exception Gem::LoadError with list of all gems on the path
#
def gem_dir_from_name(gem_name)
spec = Gem::Specification.find_by_name(gem_name)
unless spec
raise ArgumentError, _("Gem not found '%{gem_name}'") % { gem_name: gem_name }
endView on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/pops/loader/gem_support.rb:32 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/55ead66feb0979b7.
Report an issue: GitHub.