{"record":{"id":"928e93f2c03ed6be","repo":"ruby/rubygems","slug":"you-must-supply-exec-name","errorCode":null,"errorMessage":"you must supply exec_name","messagePattern":"you must supply exec_name","errorType":"validation","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/rubygems.rb","lineNumber":250,"sourceCode":"  def self.bin_path(name, exec_name = nil, *requirements)\n    requirements = Gem::Requirement.default if\n      requirements.empty?\n\n    find_spec_for_exe(name, exec_name, requirements).bin_file exec_name\n  end\n\n  def self.find_and_activate_spec_for_exe(name, exec_name, requirements)\n    spec = find_spec_for_exe name, exec_name, requirements\n    Gem::LOADED_SPECS_MUTEX.synchronize do\n      spec.activate\n      finish_resolve\n    end\n    spec\n  end\n  private_class_method :find_and_activate_spec_for_exe\n\n  def self.find_spec_for_exe(name, exec_name, requirements)\n    raise ArgumentError, \"you must supply exec_name\" unless exec_name\n\n    dep = Gem::Dependency.new name, requirements\n\n    loaded = Gem.loaded_specs[name]\n\n    return loaded if loaded && dep.matches_spec?(loaded)\n\n    specs = dep.matching_specs(true)\n\n    specs = specs.find_all do |spec|\n      spec.executables.include? exec_name\n    end if exec_name\n\n    unless spec = specs.first\n      msg = \"can't find gem #{dep} with executable #{exec_name}\"\n      raise Gem::GemNotFoundException, msg\n    end\n","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems.rb#L232-L268","documentation":"Error \"you must supply exec_name\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems.rb:250 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}