eRuby questions

Hi,

I have been trying to find alternatives and faster way of serving
server side HTML or WML from Ruby instead of serving it through an ERB
program or through a RAILS program.

This question is somewhat related to an earlier question posted by
Sunny H…

I have begun evaluating eRuby and configured it with Apache on a
Windows Machine.

Basic ruby output seems to be working fine, but whenever I try use CGI
methods to read request parameters or create cookies, an internal
server 500 is being thrown.

Can anyone tell me,

If anyone has configured and used eRuby for serving dynamic WEB / WML
pages
Are there standard bench marks to see the performance difference
between RAILS vs ERB vs eRuby vs ERUBIS and which is the best
recommended ?

Azif

Are there standard bench marks to see the performance difference
between RAILS vs ERB vs eRuby vs ERUBIS and which is the best
recommended ?

Erubis claims to be fastest eRuby implementation. Never seen any
dispute about it.

On Wed, Mar 21, 2007 at 01:30:08PM +0900, Dude wrote:

I have begun evaluating eRuby and configured it with Apache on a
Windows Machine.

Do you mean Apache with mod_ruby, or some other way?

http://wiki.modruby.net/en/?InstallGuide (but I’m not sure mod_ruby runs
under Windows)

Basic ruby output seems to be working fine, but whenever I try use CGI
methods to read request parameters or create cookies, an internal
server 500 is being thrown.

What is written to your Apache error log?

Here’s the apache error log…

[Wed Mar 21 14:33:16 2007] [notice] Child 696: Starting thread to
listen on port 8080.
[Wed Mar 21 14:33:22 2007] [error] [client 127.0.0.1] Premature end of
script headers: eruby.exe
[Wed Mar 21 14:33:22 2007] [error] [client 127.0.0.1] C:\Documents
and Settings\Asif A.\user\WAPLanding\landingPage.rhtml:11:
undefined local variable or method `cgi’ for main:Object (NameError)\


None of the CGI methods seem to work with eRuby.

And no, I have not configured mod_ruby - I have only directly
configured eRuby.

Dude.

On Mar 22, 2007, at 08:30, Dude wrote:

undefined local variable or method `cgi’ for main:Object (NameError)
Hi, Dude!
Are you sure you haven’t forgotten the quotes:

require ‘cgi’

Yours sincerely,
Damian/Three-eyed Fish

On 3/22/07, Dude [email protected] wrote:

undefined local variable or method `cgi’ for main:Object (NameError)\


None of the CGI methods seem to work with eRuby.

And no, I have not configured mod_ruby - I have only directly
configured eRuby.

Is your eRuby emitting the HTTP response headers or just the body text?

The latter won’t do I think.

http://httpd.apache.org/docs/1.3/misc/FAQ-F.html#premature-script-headers


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/