[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

eRuby questions

Dude

3/21/2007 4:28:00 AM

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

5 Answers

John Joyce

3/21/2007 4:36:00 AM

0


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

Brian Candler

3/21/2007 5:39:00 AM

0

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/?In... (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?

Dude

3/22/2007 5:28:00 AM

0

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.

Rick DeNatale

3/22/2007 1:35:00 PM

0

On 3/22/07, Dude <azifali@gmail.com> wrote:
> 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-scri...

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denh...

Damian Terentyev

3/22/2007 3:33:00 PM

0

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

> 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