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.
# File lib/rubygems.rb, line 253
def self.bin_path(name, exec_name = nil, *requirements)
# TODO: fails test_self_bin_path_bin_file_gone_in_latest
# Gem::Specification.find_by_name(name, *requirements).bin_file exec_name
raise ArgumentError, "you must supply exec_name" unless exec_name
requirements = Gem::Requirement.default if
requirements.empty?
find_spec_for_exe(name, exec_name, requirements).bin_file exec_name
end