From: "J. D." Date: 2004-11-02T00:23:57+09:00 Subject: Re: fastcgi + eruby Patrick May wrote: > > On Monday, November 1, 2004, at 09:33 AM, J. D. wrote: > >> What is the best way to handle .rhtml (eruby) documents using fastcgi? >> >> I'm using Linux, Apache2 and fcgi 0.8.4. >> >> I'm trying to convert a site from mod_ruby to fastcgi so I can run >> some comparison tests. >> >> Converting .rbx was easy but I'm not sure how to best handle .rhtml. > > > Maybe use the erb interpreter, and use fcgi instead of cgi? I think > that might work, but at the expense of having to insert a big loop into > all your rhtml templates. There's a cool continuation hack that matz > wrote to make cgi work with fcgi, without any code changes. But there > are some ruby bugs that affect continuations. > > ~ patrick > > > Thanks, you're right about erb! Googling 'erb' instead of 'eruby' resulted in finding this: http://pub.cozmixng.org/~the-rwiki/rw-cgi.rb?cmd=view;name=ERbMemo.en The part about 'using as a library' on the page was particularly helpful. I guess I can just include it inside the fcgi loop.