# Ruby programming for the web

**URL:** <https://www.ruby-forum.com/t/ruby-programming-for-the-web/103489>\
**Category:** Ruby\
**Created:** [May 7, 2007, 2:25am UTC](https://www.ruby-forum.com/t/ruby-programming-for-the-web/103489 "2007-05-07T02:25:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Piett\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9d8465/32.png) [@Piett\_H](https://www.ruby-forum.com/u/Piett_H)\
**Post date:** [May 7, 2007, 2:25am UTC](https://www.ruby-forum.com/t/ruby-programming-for-the-web/103489/1 "2007-05-07T02:25:32Z")

</div>

Hi,

(i do not pretend to use RoR)  
For a web app using a MySQL or Postgres db (and some YAML for static  
cached data), hosted on a Debian machine, can i have:

- lighttpd
- fastcgi
- eruby

eruby is my question. Can i use it with lighttpd ?  
The first web app is a specific content manager for the client company  
needs. The need for eruby is just embed code in html. Even so, can i use  
cgi’s for session managment, etc ?

thank you,  
Piett H.

---

<div class="post-metadata">

**Author:** ![Piett\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9d8465/32.png) [@Piett\_H](https://www.ruby-forum.com/u/Piett_H)\
**Post date:** [May 7, 2007, 4:25am UTC](https://www.ruby-forum.com/t/ruby-programming-for-the-web/103489/2 "2007-05-07T04:25:39Z")

</div>

Piett H. wrote:

> eruby is my question. Can i use it with lighttpd ?

cgi.assign = ( “.rhtml” =\> “/usr/local/bin/eruby” )

---

<div class="post-metadata">

**Author:** ![Piett\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9d8465/32.png) [@Piett\_H](https://www.ruby-forum.com/u/Piett_H)\
**Post date:** [May 7, 2007, 9:58am UTC](https://www.ruby-forum.com/t/ruby-programming-for-the-web/103489/3 "2007-05-07T09:58:59Z")

</div>

On Mon, May 07, 2007 at 11:25:05AM +0900, pedro mg wrote:

> Piett H. wrote:
> 
> > eruby is my question. Can i use it with lighttpd ?
> 
> cgi.assign = ( “.rhtml” =\> “/usr/local/bin/eruby” )

Although I think that each page hit will spawn off a completely new Ruby  
interpreter from scratch. This shouldn’t be a problem if your  
application is  
only lightly used. Otherwise, you might want to consider something like  
fastcgi (see ruby-fcgi in rubyforge). I’m pretty sure that lighttpd can  
talk  
to fastcgi processes.

Alternatively, write your application as a standalone HTTP app using  
webrick  
or mongrel, and then use lighttpd to proxy \*.rhtml to the app.
