Changeset 18761 for lang/ruby

Show
Ignore:
Timestamp:
09/03/08 21:30:26 (3 months ago)
Author:
hajimehoshi
Message:

Modified server.rb for Windows

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/bokeshi/trunk/website/server.rb

    r18746 r18761  
    11require "webrick" 
     2require "rbconfig" 
    23 
    3 WEBrick::HTTPServer.new(:DocumentRoot => "./public", 
    4                         :Port => 3000).start 
     4options = { 
     5  :DocumentRoot => "./public", 
     6  :Port => 3000, 
     7} 
     8if RUBY_PLATFORM =~ /mswin|cygwin|mingw/ 
     9  options[:CGIInterpreter] = File.join(RbConfig::CONFIG["bindir"], "ruby.exe") 
     10end 
     11 
     12WEBrick::HTTPServer.new(options).start