mod_ruby + dbi = segfault

Belorion <[email protected]> Mon, 16 May 2005 09:20:15 -0500
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
Hello.  I recently setup the following configuration:

Suse 9.1 (a very minimal install from the dedicated host provider)
Apache httpd 2.0.49

I removed the installed Ruby 1.8.1.  And then installed:

Ruby 1.8.2
mod_ruby 1.2.4
eruby 1.0.5
ruby-dbi 0.0.21
mysql-ruby 2.6

The following code, when embedded in an rhtml, throws a segfault error
to the apache log:

require 'dbi'
dbh = DBI.connect(my info for my mysql db)
sth = dbh.prepare( "SELECT * FROM foo" )
sth.execute

Specifically, I get a segfault if I have the sth.execute line.  Ruby
DBI with MySQL works fine from IRB or a command line executed ruby
script, which leads me to beleive the source of my issue is mod_ruby
related.

Does anyone have any suggestions about how to approach this problem?

Thanks.

Matt

Adendum:

Originally when I installed dbi, and mysql-ruby, the root users umask
was 007.  So I was originally getting permission errors.  I then
reinstalled them with a umask of 022.  No more permission errors, but
now I get segfaults..  Wondering if I might have installed other ruby
components with a bad umask, or perhaps had not fully uninstalled Ruby
1.8.1, I went ahead and deleted /usr/local/lib/ruby/* and
/usr/lib/ruby/* , all ruby related compiled binaries in /usr/bin and
usr/local/bin, and the mod_ruby.so file.  I then
reconfigured/recompiled/reinstalled Ruby and all the above compenents.
 Still I get segfaults.