Skip to content

Instantly share code, notes, and snippets.

@naokits
Created May 31, 2009 16:12
Show Gist options
  • Save naokits/120924 to your computer and use it in GitHub Desktop.
Save naokits/120924 to your computer and use it in GitHub Desktop.
# Get path of currently-executing Ruby interpreter
# 現在実行中のRubyインタプリタのパスを取得する
require 'rbconfig'
ruby_path = File.join(Config::CONFIG["bindir"],
Config::CONFIG["RUBY_INSTALL_NAME"]+
Config::CONFIG["EXEEXT"])
p ruby_path // disp got ruby path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment