ruby/rubygems · error · Gem::Exception
Unable to find spec for #{name.inspect}
Error message
Unable to find spec for #{name.inspect} What it means
Error "Unable to find spec for #{name.inspect}" thrown in ruby/rubygems.
Source
Thrown at lib/rubygems/source/local.rb:109
if version.satisfied_by?(s.version)
if prerelease
found << s
elsif !s.version.prerelease? || version.prerelease?
found << s
end
end
end
found
end
def fetch_spec(name) # :nodoc:
load_specs :complete
if data = @specs[name]
data.last.spec
else
raise Gem::Exception, "Unable to find spec for #{name.inspect}"
end
end
def download(spec, cache_dir = nil) # :nodoc:
load_specs :complete
@specs.each do |_name, data|
return data[0] if data[1].spec == spec
end
raise Gem::Exception, "Unable to find file for '#{spec.full_name}'"
end
def pretty_print(q) # :nodoc:
q.object_group(self) do
q.group 2, "[Local gems:", "]" do
q.breakable
if @specsView on GitHub (pinned to 86cbb817a3)
Solutions
- Build the gem first (`gem build <name>.gemspec`) so a spec exists locally
- Check the gem name spelling
When it happens
Trigger: Thrown at lib/rubygems/source/local.rb:109 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ruby/rubygems@86cbb817a3 (2026-08-23).
Data as JSON: /api/errors/251386aed72e3e64.
Report an issue: GitHub.