Chris, I had the same problem too. It turns out that both mod_ruby 1.0.1 and
eruby0.9.8 are INCOMPATIBLE with ruby 1.7.x.
So, what I did is re-install ruby 1.6.7, mod_ruby1.0.1, and eruby0.9.8.
All the compilation, and installation went fine EXCEPT
IT NEVER WORKS THRU USING Apache 2.0.43.
I made sure that all the shared library object directory are in
/etc/ld.so.conf, ran ‘ldconfig’, configure apache’s httpd.conf , and
restart the Apache Server.
It never recognize <% … %>. Anything inside is never printed.
*.rhtm(eruby) and *.rbx(mod_ruby) are not recognize either. It’s only
display the content of those files.
I had similar problems with mod_ruby, apache-1.3 and Ruby 1.7.3 on a
redhat-7.3 box. The attached fix made it compile for me. Perhaps you’re
lucky, too.
Apparently mod_ruby has a function “ruby_cleanup” which conflicts with
ruby 1.7.3 (has another function with the same name).
A simple fix would be to just rename all occurences of ruby_cleanup in
mod_ruby.c to another name, say “mod_ruby_cleanup”, this would be in
lines 513 and 643 of mod_ruby.c.
[Wed Dec 04 12:49:12 2002] [error] mod_ruby: error in ruby
/usr/local/lib/ruby/1.7/apache/ruby-run.rb:43:in require': No such file to load -- singleton (LoadError) from /usr/local/lib/ruby/1.7/apache/ruby-run.rb:43 from ruby:0:inrequire’
from ruby:0
So it looks like the loadpath is screwed up, I think. Anyone know how I
ought to fix this, so that RubyRequire knows where to look for things?
Chris, I had the same problem too. It turns out that both mod_ruby 1.0.1 and
eruby0.9.8 are INCOMPATIBLE with ruby 1.7.x.
eRuby took a bit of messing with, but with the help of the mod_ruby mailing
list, I got it working just fine with 1.7.3. Not that I care… it’s
mod_ruby that I want. I never use eRuby.
Apparently mod_ruby has a function “ruby_cleanup” which conflicts with
ruby 1.7.3 (has another function with the same name).
A simple fix would be to just rename all occurences of ruby_cleanup in
mod_ruby.c to another name, say “mod_ruby_cleanup”, this would be in
lines 513 and 643 of mod_ruby.c.
In the configure.rb files for both eruby and mod_ruby, I added the
following at the top:
CFLAGS = ‘’ if !defined? CFLAGS
In mod_ruby.c, I changed lines 513 and 643 to call the function
’mod_ruby_cleanup’ instead of ‘ruby_cleanup’.
After successfully configuring eruby and mod_ruby, I tried to ‘make’
them. Both failed. Whatever the last, failed gcc command was, I typed it
into the commandline, except I added ‘-lruby’ to both of them, and I added
’-L’ immediately preceding the path.
I then installed them, which went fine, and I tested eruby, which is
fine. I still need to get apache configured for mod_ruby, but I’ll tell you
how that goes!
At Wed, 4 Dec 2002 18:40:10 +0900, Florian Frank wrote:
I had similar problems with mod_ruby, apache-1.3 and Ruby 1.7.3 on a
redhat-7.3 box. The attached fix made it compile for me. Perhaps you’re
lucky, too.
I haven’t consider about programs which doesn’t use extconf.rb
like mod_ruby.
I still need to get apache configured for mod_ruby, but I’ll tell you how
that goes!
···
----- Original Message -----
Well, it isn’t working. This is from my error_log:
[Wed Dec 04 09:34:18 2002] [error] mod_ruby: error in ruby
(eval): uninitialized constant RubyRun at Apache (NameError)
from ruby:0:in `value’
from ruby:0
So, that’s the state of things. I got mod_ruby and eruby to configure,
compile, and install, but I can’t get Apache to use mod_ruby. Is this just
an Apache 2 problem, or is it something else? Has anyone gotten mod_ruby to
work with Apache 2?
Have you ever successfully implemented the mod_ruby and apache 2.0.43
combination and tested thru a web browser? Thanks
If you do and it works, would u post the httpd.conf and the test file so I
can put it on my configuration. I’ve been struggling to get mod_ruby to work
with a browser. Thanks again.
Chris, thanks for the instruction. It compiles correctly. I even tested with
a few scripts and thru command line.
Next is to get it to work with Apache 2.0.43 and web browser. See if you get
the expected result. I’ve been struggling to get this Apache, mod_ruby, and
eruby combination to work.
At Thu, 5 Dec 2002 04:11:05 +0900, Useko Netsumi wrote:
Have you ever successfully implemented the mod_ruby and apache 2.0.43
combination and tested thru a web browser? Thanks
If you do and it works, would u post the httpd.conf and the test file so I
can put it on my configuration. I’ve been struggling to get mod_ruby to work
with a browser. Thanks again.
No, I haven’t compiled mod_ruby yet. I’m using ruby 1.7 with
Oniguruma RE engine, but mod_ruby couldn’t compiled with it.