ruby/rubygems · error · Gem::InstallError
gem #{@gem.inspect} is not installed
Error message
gem #{@gem.inspect} is not installed What it means
Error "gem #{@gem.inspect} is not installed" thrown in ruby/rubygems.
Source
Thrown at lib/rubygems/uninstaller.rb:107
end
##
# Performs the uninstall of the gem. This removes the spec, the Gem
# directory, and the cached .gem file.
def uninstall
dependency = Gem::Dependency.new @gem, @version
list = []
specification_record.stubs.each do |spec|
next unless dependency.matches_spec? spec
list << spec
end
if list.empty?
raise Gem::InstallError, "gem #{@gem.inspect} is not installed"
end
default_specs, list = list.partition(&:default_gem?)
warn_cannot_uninstall_default_gems(default_specs - list)
@default_specs_matching_uninstall_params = default_specs.map(&:to_spec)
list, other_repo_specs = list.partition do |spec|
@gem_home == spec.base_dir ||
(@user_install && spec.base_dir == @user_dir)
end
list.sort!
if list.empty?
return unless other_repo_specs.any?
other_repos = other_repo_specs.map(&:base_dir).uniq
View on GitHub (pinned to 86cbb817a3)
Solutions
- Check the gem name with `gem list` and uninstall the installed name
- Specify the exact version with `-v` if multiple versions exist
When it happens
Trigger: Thrown at lib/rubygems/uninstaller.rb:107 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/5e44f32f89b53e76.
Report an issue: GitHub.