Created
November 2, 2010 09:16
-
-
Save ognevsky/659406 to your computer and use it in GitHub Desktop.
using several versions of ruby w/o rvm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function r19 { | |
switch-ruby $(brew --prefix)/Cellar/ruby/1.9.2-p0/bin | |
} | |
function r18 { | |
switch-ruby $(brew --prefix)/Cellar/ruby-enterprise-edition/2010.02/bin | |
} | |
function switch-ruby { | |
echo "using $1" | |
export PATH=$(ruby -e 'puts ENV["PATH"].split(":").map { |p| p =~ /\bruby\b/ ? ARGV[0] : p }.uniq.join(":")' $1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment