require "rubygems" require "rack" def run(server) require server s = Rack::Handler.const_get("#{server.capitalize}") app = proc {|env| [200, {"Content-Type" => "text/plain"}, "hello"]} s.run(app,:Host => '127.0.0.1', :Port => 2323) end run "thin" # run "mongrel"