M
Max Benjamin
Hello list,
I'm using webrick to serve up rhtml pages and can't seem to access cgi
variables. My very very simple server looks like this:
########################
require 'webrick'
include WEBrick
def start_webrick(config = {})
config.updatePort => 8080)
config.updateMimeTypes => {'rhtml' => 'text/html'})
server = HTTPServer.new(config)
yield server if block_given?
['INT', 'TERM'].each {|signal|
trap(signal) {server.shutdown}
}
ruby_dir = File.expand_path('html')
server.mount("html", HTTPServlet::ERBHandler, ruby_dir)
server.start
end
start_webrickDocumentRoot => 'html')
#########################
When I attempt to get cgi variables I receive the following message:
(offline mode: enter name=value pairs on standard input)
How do I run the program in "non-offline" mode?
Thanks for the help!
I'm using webrick to serve up rhtml pages and can't seem to access cgi
variables. My very very simple server looks like this:
########################
require 'webrick'
include WEBrick
def start_webrick(config = {})
config.updatePort => 8080)
config.updateMimeTypes => {'rhtml' => 'text/html'})
server = HTTPServer.new(config)
yield server if block_given?
['INT', 'TERM'].each {|signal|
trap(signal) {server.shutdown}
}
ruby_dir = File.expand_path('html')
server.mount("html", HTTPServlet::ERBHandler, ruby_dir)
server.start
end
start_webrickDocumentRoot => 'html')
#########################
When I attempt to get cgi variables I receive the following message:
(offline mode: enter name=value pairs on standard input)
How do I run the program in "non-offline" mode?
Thanks for the help!