Re: help with install

Mat Schaffer <[email protected]> Mon, 27 Nov 2006 13:08:36 -0500
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
On Nov 25, 2006, at 1:48 AM, Mike A. Kenny wrote:

> I am running on Ubuntu 6.0.6 using:
> ruby 1.8.5 (2006-08-25) [i686-linux]
> Rails 1.1.6
> gem 0.9.0
>
> I downloaded eruby 1.0.5 and ran:
>
> $ ./configure.rb --with-apxs=/usr/bin/apxs2 --enable-shared
> $ make
> $ sudo make install
>
> and update httpd.conf to reference the shared object. Not  
> mod_ruby.so as  stated in the wiki but liberuby.so as this was the  
> only shared object created. (I hate when reality differs from  
> documentation - it normally means that I have missed something). I  
> then executed:
>
> $ sudo apache2ctl start
>
> which reported
>
> Syntax error on line 7 of /etc/apache2/httpd.conf:
> Cannot load /usr/local/lib/liberuby.so into server: /usr/local/lib/ 
> liberuby.so: undefined symbol: ruby_debug
>
> Where have I gone wrong?

I'm not sure sure the documentation differers from reality.  My eruby  
+ apache setup is done through mod_ruby.  It's a seperate download  
from eruby available here:
http://www.modruby.net/en/

My apache config looks like this:
LoadModule ruby_module /usr/libexec/httpd/mod_ruby.so

<IfModule mod_ruby.c>
   RubyRequire apache/ruby-run
   RubyRequire apache/eruby-run
   RubyRequire apache/eruby-debug
   RubyRequire cgi
   DirectoryIndex index.html index.rhtml index.php

   # Execute *.rbx files as Ruby scripts
   <Files *.rbx>
     Options ExecCGI
     SetHandler ruby-object
     RubyHandler Apache::RubyRun.instance
   </Files>

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

Hope that helps!
-Mat