ruby/rubygems · error · ArgumentError
you must supply exec_name
Error message
you must supply exec_name
What it means
Error "you must supply exec_name" thrown in ruby/rubygems.
Source
Thrown at lib/rubygems.rb:250
def self.bin_path(name, exec_name = nil, *requirements)
requirements = Gem::Requirement.default if
requirements.empty?
find_spec_for_exe(name, exec_name, requirements).bin_file exec_name
end
def self.find_and_activate_spec_for_exe(name, exec_name, requirements)
spec = find_spec_for_exe name, exec_name, requirements
Gem::LOADED_SPECS_MUTEX.synchronize do
spec.activate
finish_resolve
end
spec
end
private_class_method :find_and_activate_spec_for_exe
def self.find_spec_for_exe(name, exec_name, requirements)
raise ArgumentError, "you must supply exec_name" unless exec_name
dep = Gem::Dependency.new name, requirements
loaded = Gem.loaded_specs[name]
return loaded if loaded && dep.matches_spec?(loaded)
specs = dep.matching_specs(true)
specs = specs.find_all do |spec|
spec.executables.include? exec_name
end if exec_name
unless spec = specs.first
msg = "can't find gem #{dep} with executable #{exec_name}"
raise Gem::GemNotFoundException, msg
end
View on GitHub (pinned to 86cbb817a3)
When it happens
Trigger: Thrown at lib/rubygems.rb:250 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/928e93f2c03ed6be.
Report an issue: GitHub.