[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

my mod_ruby doesn't like my eruby

Daniel Cremer

9/14/2003 6:24:00 PM

Hi,

I'm not able to make eruby work with mod_ruby for some
reason and I haven't found any solutions by looking at
cases with a similar problem.
Each time I run the .rhtml file through the browser I
get an Error 500. I'm using Apache 2.0.40,
mod_ruby-1.0.7, eruby 1.0.4 and ruby 1.8.0. I can run
the .rhtml file with eruby fine and I have checked the
permissions on the file. I have also checked the
httpd.conf file. A look at the error log tells me
this:

[Sun Sep 14 14:03:29 2003] [error] mod_ruby: error in
ruby!(eval):45: (eval):45: uninitialized constant
Apache::ErubyRun (NameError)!!from (eval):45:in
`value'!

Now this makes me assume that I haven't compiled
mod_ruby with eruby (I probably didn't the first
time). However I have gone back and run configure.rb
like this:

[root@li2-108 mod_ruby-1.0.7]# ./configure.rb
--enable-eruby
checking for a BSD compatible install...
/usr/bin/install -c
checking whether we are using gcc... yes
checking Ruby version... 1.8.0
checking for static Apache module support... no
checking for dynamic Apache module support... yes
checking for eruby... yes
creating Makefile
creating libruby.module
creating doc/Makefile


When I check I can tell the mod_ruby.so file has been
updated. So normally everything should be fine right?
So I'm kind of stumped at this point. Does anyone have
any ideas please? Am I looking in the wrong direction?
Thanks,
Daniel


________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://mail.messenger.y...

1 Answer

Samuel Tesla

9/14/2003 7:24:00 PM

0

Daniel Cremer <vivo_sengodo@yahoo.co.uk> writes:
> the .rhtml file with eruby fine and I have checked the
> httpd.conf file. A look at the error log tells me
> this:
>
> [Sun Sep 14 14:03:29 2003] [error] mod_ruby: error in
> ruby!(eval):45: (eval):45: uninitialized constant
> Apache::ErubyRun (NameError)!!from (eval):45:in
> `value''!

What exactly *do* you have in your httpd.conf, it sounds like you just
aren''t requiring the appropriate module. Here''s the relevant section
from my httpd.conf

<IfModule mod_ruby.c>
# for Apache::RubyRun
RubyRequire apache/ruby-run

# exec *.rbx as ruby scripts.
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>

# for Apache::ERubyRun
RubyRequire apache/eruby-run

# handle *.rhtml as eruby files.
<Files *.rhtml>
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
</Files>
</IfModule>