Method: Gem.bin_path
- Defined in:
- lib/rubygems.rb
.bin_path(name, exec_name = nil, *requirements) ⇒ Object
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.
240 241 242 243 244 245 |
# File 'lib/rubygems.rb', line 240 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 |