eRuby questions

D

Dude

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 Hirai.

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
 
J

John Joyce

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.
 
B

Brian Candler

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?
 
D

Dude

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 Ali\\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.
 
R

Rick DeNatale

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 Ali\\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.

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
 
D

Damian Terentyev

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 Ali\\user\\WAPLanding\\landingPage.rhtml:11:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,414
Latest member
GayleWedel

Latest Threads

Top