From b94a47472ffdd8cd2785d1a24c0b74237a74f280 Mon Sep 17 00:00:00 2001 From: Rich Morin Date: Mon, 16 Jan 2012 14:18:47 -0800 Subject: [PATCH] Update help/tools --- help/tools | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/help/tools b/help/tools index 16e54e477a..b031cc4bdc 100644 --- a/help/tools +++ b/help/tools @@ -41,3 +41,11 @@ Your scripts can then request the proper Ruby, using shebang: #!/usr/bin/ruby-rvm-env 1.9.3 The script will be run using Ruby 1.9.3 from rvm. + +Alternatively, here's a hack to make a script switch itself: + + if !ENV['ruby_switch_flag'] + ENV['ruby_switch_flag'] = '42' + system('rvm', '1.9.3', 'do', __FILE__, *ARGV) + exit 0 + end