Skip to content

Instantly share code, notes, and snippets.

@ebot
Created February 9, 2010 20:14
Show Gist options
  • Save ebot/299614 to your computer and use it in GitHub Desktop.
Save ebot/299614 to your computer and use it in GitHub Desktop.
Switches windows ruby environment between 1.8 and 1.9.
@echo off
IF EXIST c:\ruby18 GOTO switch_19
IF EXIST c:\ruby19 GOTO switch_18
echo No alternate ruby environment found.
GOTO print_version
:switch_19
echo Switching to Ruby 1.8...
rename c:\ruby ruby19
rename c:\ruby18 ruby
GOTO print_version
:switch_18
echo Switching to Ruby 1.9...
rename c:\ruby ruby18
rename c:\ruby19 ruby
GOTO print_version
:print_version
ruby -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment