require "webrick"
include WEBrick

class MyCustomServlet < HTTPServlet::AbstractServlet
    def do_GET(request, response)
        response.status = 200
        response["Content-Type"] = "text/html"
        response.body = "<html><body><h1>This is the HTML body</h1></body></html>"
    end
end

httpd = HTTPServer.new(:BindAddress => "127.0.0.1", :Port => 8000)
httpd.mount("/webrick", MyCustomServlet)
[:INT, :TERM].each { |signal|  trap signal do httpd.shutdown end }

IO.popen("path/to/iexplore.exe http://#{httpd[:BindAddress]}:#{httpd[:Port]}/webrick/")

## ... or we can launch IE using the windows-specific win32ole module
# require "win32ole"
# ie = WIN32OLE.new("InternetExplorer.Application")
# ie.visible = true
# ie.navigate("http://#{httpd[:BindAddress]}:#{httpd[:Port]}/webrick/")

httpd.start