method
rubybin
v1_9_3_125 -
Show latest stable
- Class:
Gem::TestCase
rubybin()public
Finds the path to the ruby executable
# File lib/rubygems/test_case.rb, line 810
def self.rubybin
ruby = ENV["RUBY"]
return ruby if ruby
ruby = "ruby"
rubyexe = "#{ruby}.exe"
3.times do
if File.exist? ruby and File.executable? ruby and !File.directory? ruby
return File.expand_path(ruby)
end
if File.exist? rubyexe and File.executable? rubyexe
return File.expand_path(rubyexe)
end
ruby = File.join("..", ruby)
end
begin
require "rbconfig"
File.join(RbConfig::CONFIG["bindir"],
RbConfig::CONFIG["ruby_install_name"] +
RbConfig::CONFIG["EXEEXT"])
rescue LoadError
"ruby"
end
end Related methods
- Instance methods
- all_spec_names
- assert_path_exists
- build_rake_in
- create_tmpdir
- dep
- install_gem
- install_gem_user
- install_specs
- make_command
- mu_pp
- new_spec
- nmake_found?
- process_based_port
- quick_gem
- quick_spec
- read_binary
- read_cache
- refute_path_exists
- req
- setup
- spec
- teardown
- uninstall_gem
- util_build_gem
- util_clear_gems
- util_gem
- util_gzip
- util_make_gems
- util_set_arch
- util_setup_fake_fetcher
- util_setup_spec_fetcher
- util_spec
- util_zip
- v
- vc_windows?
- win_platform?
- write_file
- Class methods
- make_command
- process_based_port
- rubybin
- vc_windows?
- win_platform?