I have using Webrick + CGI and when I instantiate, returns an error: (offline mode: enter name=value pairs on standard input)
irb(main):001:0> require 'cgi' => true irb(main):002:0> cgi = CGI.new (offline mode: enter name=value pairs on standard input)
Nope, not an error. That’s the way it works.
From the ruby-docs CGI documentation
In the irb console, after the
(offline mode: enter name=value pairs on standard input)message, the console is waiting for you to enter the values. Enterkey value pairsfollowed by Ctrld to finish entering data.Ctrld
Refer to CGI Programming Documentation on PLEAC-Ruby for further code examples of working with CGI in ruby.