http://d.hatena.ne.jp/faerie/20060322#1143035885 :DUMMY; <<END_OF_BATCH @echo off ruby %0 goto EXIT_BATCH END_OF_BATCH require 'webrick' require 'rbconfig' h = Config::CONFIG s = WEBrick::HTTPServer.new({ :DocumentRoot => '.', :Port => 12345, :CGIInterpreter => h['bindir'] + '\\' + h['ruby_install_name'] + h['EXEEXT'].to_s }) Signal.trap("INT"){ s.shutdown } s.start :EXIT_BATCH 保存して突付けば http://loc