Skip to content

Instantly share code, notes, and snippets.

@chikuchikugonzalez
Created January 15, 2013 15:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chikuchikugonzalez/4539557 to your computer and use it in GitHub Desktop.
Save chikuchikugonzalez/4539557 to your computer and use it in GitHub Desktop.
時分の環境でMinGW RubyとActiveRubyとJRubyを切り替えるために作った簡易バッチファイル
@echo off
:: vim: set sts=4 ts=4 sw=4 expandtab:
setlocal ENABLEDELAYEDEXPANSION
set _rubyhome_ruby=E:\Ruby\Ruby1.9
set _rubyhome_ruby18=E:\Ruby\Ruby1.8
set _rubyhome_ruby19=E:\Ruby\Ruby1.9
set _rubyhome_activeruby=E:\Ruby\ActiveRuby1.9
set _rubyhome_activeruby18=E:\Ruby\ActiveRuby1.8
set _rubyhome_activeruby19=E:\Ruby\ActiveRuby1.9
set _rubyhome_jruby=E:\Ruby\JRuby1.7
set _rubyhome_jruby17=E:\Ruby\JRuby1.7
set _rubyhome_default=E:\Ruby\Ruby1.9
set _rubyversion=%1
if "%1" == "" (
21set _rubyversion=default
)
if not "!_rubyhome_%_rubyversion%!" == "" (
set PATH=!_rubyhome_%_rubyversion%!\bin;!PATH!
cmd
) else (
echo Unknown Ruby: !_rubyversion!
)
:END
endlocal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment