Skip to content

Instantly share code, notes, and snippets.

@moznion
Created October 11, 2012 16:05
Show Gist options
  • Save moznion/3873432 to your computer and use it in GitHub Desktop.
Save moznion/3873432 to your computer and use it in GitHub Desktop.
ruby_switcher
#!/usr/bin/env perl
use strict;
use warnings;
my $rvm_path = "~/.rvm/rubies";
`rvm list` =~ /=.*?(ruby-.*?)\s\[/;
system("$rvm_path/$1/bin/ruby @ARGV");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment