OSX RubyRequire apache/eruby-run apache start issue

Nick Van Weerdenburg <[email protected]>
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>

Hi all,

I'm trying to configure the latest stable versions of mod_ruby and 
eruby and am getting the following problem.

"RubyRequire apache/eruby-run" causes apache to not start (if I comment 
it out, apache starts) while "RubyRequire apache/ruby-run" does not 
have this problem. Below are my additions to httpd.conf, with both 
RubyRequires enabled. eruby runs fine by itself from the command line.

The apache error log shows rb_ undefined symbol issues. I suppose the 
this is the crux of the matter, but I don't know what I can do about 
it. I've included the apache log below the httpd.conf section below.

I've tried rebuilding all of mod_ruby, eruby, and ruby with different 
compiler options, but with no luck.

My version of ruby is 1.8.1.

Does anyone have an suggestions? I saw some suggestions at 
www.rubygarden.org, but none of those worked.

BTW-
I got mod_ruby and eruby via cvs  (latest stable) a couple of days ago 
and built them on my Mac OS X (10.3.3) system.

I used the following cvs commands from the modruby website...
$ cvs -d :pserver:[email protected]:/src login
(Logging in to [email protected])
CVS password:  (anonymous)
$ cvs -d :pserver:[email protected]:/src checkout \
   -r version_1_0-branch mod_ruby
$ cvs -d :pserver:[email protected]:/src checkout eruby

Thanks,
Nick

----------------------
httpd.conf settings:
----------------------
# Note: /usr/local/apache/libexec/mod_ruby.so is just an example.
#       You should specify the correct path to mod_ruby.so.
LoadModule ruby_module /usr/libexec/httpd/mod_ruby.so

# # If ClearModuleList is used in your httpd.conf, you should use 
AddModule
# # to activate the ruby module.
AddModule mod_ruby.c

# If the ruby module is installed, this will be enabled.
<IfModule mod_ruby.c>
   # for Apache::RubyRun
   RubyRequire apache/ruby-run

   # exec files under /ruby as ruby scripts.
   <Location /ruby>
     SetHandler ruby-object
     RubyHandler Apache::RubyRun.instance
     Options ExecCGI
   </Location>

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

   # # for Apache::ERubyRun
   RubyRequire apache/eruby-run
   #
   # # handle files under /eruby as eRuby files by eruby.
    <Location /eruby>
      SetHandler ruby-object
      RubyHandler Apache::ERubyRun.instance
      Options ExecCGI
    </Location>
   #
   # # handle *.rhtml as eruby files.
    <Files *.rhtml>
      SetHandler ruby-object
      RubyHandler Apache::ERubyRun.instance
    </Files>

   # # for Apache::ERbRun
   # RubyRequire apache/erb-run
   #
   # # handle files under /erb as eRuby files by ERb.
   # <Location /erb>
   #   SetHandler ruby-object
   #   RubyHandler Apache::ERbRun.instance
   #   Options ExecCGI
   # </Location>

   # # for debug
   # RubyRequire auto-reload
</IfModule>

------------------
apache error_log
------------------
dyld: /usr/sbin/httpd Undefined symbols:
_rb_cObject
_rb_check_type
_rb_data_object_alloc
_rb_define_class_under
_rb_define_method
_rb_define_module
_rb_define_singleton_method
_rb_define_virtual_variable
_rb_eStandardError
_rb_eval_string_wrap
_rb_file_open
_rb_funcall
_rb_gc_mark
_rb_global_variable
_rb_intern
_rb_io_close
_rb_io_gets
_rb_protect
_rb_provide
_rb_raise
_rb_set_kcode
_rb_stdin
_rb_str2cstr
_rb_str_cat
_rb_str_freeze
_rb_str_new
_rb_str_new2
_re_mbctab
_ruby_debug
_ruby_show_version
_ruby_top_self
_ruby_verbose
_ruby_xmalloc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.