[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: Putting Ruby on Web?

Phillip Gawlowski

4/12/2007 7:05:00 PM

Merrie wrote:
> What is the easiest way to get started putting your ruby programs in a web browser, such as the cgi program for Mad Libs. Is there a place I can get more information on this?

The PickAxe has a chapter about Ruby as CGI. Then there's eruby, ERb
(used by Rails), Mongrel..

> I know a little PHP, not familiar with CGI, I know HTML, XTHML.

I can tell you this much: eruby is faster than CGI, especially with
mod_ruby for Apache (which is a must), and a lot easier to use, as you
can embed your Ruby code directly into HTML (no need to emit the correct
mime-type, for example).

Quick example:

<p>It is now exactly <%= Time.now %></p>

--
Phillip "CynicalRyan" Gawlowski
http://cynicalryan....
http://clothred.rub...

Rule of Open-Source Programming #20:

Open Code != Good Code

4 Answers

Kyle Schmitt

4/12/2007 7:44:00 PM

0

And don't forget Camping! http://code.whytheluckystiff.n...

Admittedly the docs are spotty, but what there is of them is fun, and
camping itself seems straightforward.

--Kyle

Phillip Gawlowski

4/12/2007 7:54:00 PM

0

Kyle Schmitt wrote:
> And don't forget Camping! http://code.whytheluckystiff.n...
>
> Admittedly the docs are spotty, but what there is of them is fun, and
> camping itself seems straightforward.

The way I understood the OP, the question wasn't about frameworks (where
Camping, IOWA and Nitro should be mentioned alongside Rails), but about
using Ruby as CGI (which would be needed for the frameworks, anyhow).

--
Phillip "CynicalRyan" Gawlowski
http://cynicalryan....
http://clothred.rub...

Rule of Open-Source Programming #11:

When a developer says he will work on something, he or she means
"maybe".

James Britt

4/12/2007 8:38:00 PM

0

Kyle Schmitt wrote:
> And don't forget Camping! http://code.whytheluckystiff.n...
>
> Admittedly the docs are spotty, but what there is of them is fun, and
> camping itself seems straightforward.

Pick up The 2nd ed. of The Ruby Way. It covers a variety of Ruby Web
frameworks (though, for various reasons, Camping didn't make it in).

--
James Britt

"In Ruby, no one cares who your parents were, all they care
about is if you know what you are talking about."
- Logan Capaldo

Merrie

4/12/2007 8:44:00 PM

0

Thanks for all the help.

Merrie
----- Original Message -----
From: "James Britt" <james.britt@gmail.com>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Thursday, April 12, 2007 4:37 PM
Subject: Re: Putting Ruby on Web?


> Kyle Schmitt wrote:
> > And don't forget Camping! http://code.whytheluckystiff.n...
> >
> > Admittedly the docs are spotty, but what there is of them is fun, and
> > camping itself seems straightforward.
>
> Pick up The 2nd ed. of The Ruby Way. It covers a variety of Ruby Web
> frameworks (though, for various reasons, Camping didn't make it in).
>
> --
> James Britt
>
> "In Ruby, no one cares who your parents were, all they care
> about is if you know what you are talking about."
> - Logan Capaldo
>