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.yahoo.co.uk
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
# for Apache::RubyRun
RubyRequire apache/ruby-run
exec *.rbx as ruby scripts.
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
for Apache::ERubyRun
RubyRequire apache/eruby-run
handle *.rhtml as eruby files.
<Files *.rhtml>
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
···
from my httpd.conf
Yeah I saw that not requiring the appropriate module
creates an error like that. However it looks a bit
different:
[Mon Jan 27 10:23:59 2003] [error] mod_ruby: error in
ruby
(eval): uninitialized constant ERubyRun at Apache
(NameError)
from ruby:0:in `value’
The version of my http.conf goes like this:
LoadModule ruby_module
/usr/lib/httpd/modules/mod_ruby.so
RubyRequire apache/eruby-run
SetHandler ruby-object
RubyHandler Apache::ErubyRun.instance
I took off all the part for .rbx etc to make sure that
i wasn’t missing a typing mistake or something of the
sort. This is why I supposed it’s a problem with the
compiling of mod_ruby with eruby. The error log seems
to indicate the mod_ruby part is working since it
doesn’t fail to launch it but atumbles at line 45.
However I could be reading this completely wrong. As
I’m sure I’m just missing something.
Thanks for any thoughts on this.
Daniel
— Samuel Tesla samuel@alieniloquent.com wrote: >
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
# for Apache::RubyRun
RubyRequire apache/ruby-run
exec *.rbx as ruby scripts.
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
for Apache::ERubyRun
RubyRequire apache/eruby-run
handle *.rhtml as eruby files.
<Files *.rhtml>
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk
RubyHandler Apache::ErubyRun.instance
^^^^^^^^^^
This should be ERuby.Run I think.
Michael
Michael Garriss wrote:
RubyHandler Apache::ErubyRun.instance
^^^^^^^^^^
This should be ERuby.Run I think.
Ugh, make that ERubyRun. Trying to watch football and do email at the
same time.
Michael
Yeah you found it. Just changed it to:
Apache::ERubyRun.instance
and it worked. Forgot to make it a capital R. Now I
feel very stupid but I have to give a big thank you. I
was barking up the wrong tree. Sorry Samuel I really
should of put the contents of the httpd.conf in my
first post. I had stared at it so much I was convinced
the mistake wasn’t there.
thanks again
Daniel
(“my mod_ruby likes my ERuby”)
— Michael Garriss mgarriss@earthlink.net wrote: >
Michael Garriss wrote:
···
RubyHandler Apache::ErubyRun.instance
^^^^^^^^^^
This should be ERuby.Run I think.
Ugh, make that ERubyRun. Trying to watch football
and do email at the
same time.
Michael
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk
Daniel Cremer vivo_sengodo@yahoo.co.uk writes:
was barking up the wrong tree. Sorry Samuel I really
should of put the contents of the httpd.conf in my
first post. I had stared at it so much I was convinced
the mistake wasn’t there.
Been there, done that
Last time I set up mod_ruby+eruby I did the
same thing.