ruby/rubygems · error · Bundler::GemNotFound
Could not find gem '#{name}', because it's in the #{verbaliz
Error message
Could not find gem '#{name}', because it's in the #{verbalize_groups(dep_in_other_group.groups)}, configured to be ignored. What it means
Error "Could not find gem '#{name}', because it's in the #{verbalize_groups(dep_in_other_group.groups)}, configured to be ignored." thrown in ruby/rubygems.
Source
Thrown at lib/bundler/cli/common.rb:85
def self.select_spec(name, regex_match = nil)
specs = []
regexp = Regexp.new(name) if regex_match
Bundler.definition.specs.each do |spec|
return spec if spec.name == name
specs << spec if regexp && spec.name.match?(regexp)
end
default_spec = default_gem_spec(name)
specs << default_spec if default_spec
case specs.count
when 0
dep_in_other_group = Bundler.definition.current_dependencies.find {|dep|dep.name == name }
if dep_in_other_group
raise GemNotFound, "Could not find gem '#{name}', because it's in the #{verbalize_groups(dep_in_other_group.groups)}, configured to be ignored."
else
raise GemNotFound, gem_not_found_message(name, Bundler.definition.dependencies)
end
when 1
specs.first
else
ask_for_spec_from(specs)
end
rescue RegexpError
raise GemNotFound, gem_not_found_message(name, Bundler.definition.dependencies)
end
def self.default_gem_spec(name)
gem_spec = Gem::Specification.find_all_by_name(name).last
gem_spec if gem_spec&.default_gem?
end
def self.ask_for_spec_from(specs)View on GitHub (pinned to 86cbb817a3)
When it happens
Trigger: Thrown at lib/bundler/cli/common.rb:85 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/0af0c70e3a742a0c.
Report an issue: GitHub.