Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
Gem.bin_path
(::String name, ::String exec_name, ?::Array[::Gem::Requirement] requirements) -> ::String
bin_path(name, exec_name = nil, *requirements)
lib/rubygems.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/rubygems.rb, line 238
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
Find the full path to the executable for gem name. If the exec_name is not given, an exception will be raised, otherwise the specified executable’s path is returned. requirements allows you to specify specific gem versions.
See also
.bindir
.cache_home
.binary_mode
.clear_default_specs
also in
4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0