From: Brian Candler Date: 2008-11-28T22:19:05+09:00 Subject: Re: eRuby/erb outside of Rails Jonny Noog wrote: > I have read about mod_ruby and mod_rails. Some sources seem to suggest > that mod_ruby "has never really worked properly", while others seem to > suggest otherwise. I have not been able to ascertain whether mod_rails > would allow the use of eRuby/erb without Rails to go with it. Also have a look at erubis: http://www.kuwata-lab.com/erubis/ Now, the /cgi-bin/eruby approach mentioned above is one to get you started; but you'll be spawning a new ruby interpreter for each request. If that becomes painful, and you don't fancy mod_ruby, then I suggest FastCGI as the way to go (with mod_fcgid). I don't know if either eruby or erubis has out-of-the-box FastCGI support, but it shouldn't be too hard to make a wrapper which reads the template and expands it, in a loop. With a bit of mtime checking you could even cache the parsed templates. Regards, Brian. -- Posted via http://www.ruby-forum.com/.