[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

CGI and Webrick

Ben Giddings

10/3/2003 8:13:00 PM

Hey all,

I've just started poking at three Ruby tools I haven't yet used: DBI,
Webrick, and CGI, and have a few questions:

* Is there good documentation for these somewhere? The distribution site
for DBI has one page listing methods for some of the objects, but not
others. For example, DBI::Row doesn't seem to be documented at all.
Webrick seems about the same, there are some quick examples, but no API
documentation I could find.

* Is there a way to get CGI to simply generate HTML? I managed to get it
to stop prompting me to set variables using:

echo | ruby my_cgi_using_prog.rb

But then it throws on content-type headers, which I don't want in my output.

* Does anybody have experience connecting Webrick and CGI? Any tips, pointers?

Ben


2 Answers

ahoward

10/3/2003 10:28:00 PM

0

John W. Long

10/4/2003 1:10:00 AM

0

> * Is there a way to get CGI to simply generate HTML? I managed to get it
> to stop prompting me to set variables using <snip />

CGI prompts you for variables because it has detected that you aren't
running it as a cgi script or on mod_ruby. It looks in your environment
variables to determine how it is being run. If you want to set up your
environment variables so that cgi behaves as if it is being run on apache
see this link:

http://modruby.net/ml/archive/modruby/200309.mont...
___________________
John Long
www.wiseheartdesign.com