From: Jeff Anderson Date: 2005-11-17T23:56:00+09:00 Subject: Re: trouble installing Ruby DBI for MySQL ------=_Part_2854_8490641.1132239346399 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Did this message even get through? Shall i just go back to programming Perl= ? On 11/16/05, Jeff Anderson wrote: > > Hello all, first time poster. > > I installed ruby 1.8.2 without a hitch and am trying to install drivers > for > accessing MySQL > > I tried to install mysql-ruby-2.6 with the following: > > ruby extconf.rb --with-mysql-include=3D/usr/include/mysql > --with-mysql-lib=3D/var/lib/mysql > make > make install > > (no errors) > > and ruby-dbi-all-0.0.21 with: > > ruby setup.rb config --with=3Ddbi,dbd_mysql > ruby setup.rb setup > ruby setup.rb install > > (no errors here either) > > But when i attempt to run a simple script: > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > require "dbi" > > DBI.connect("dbi:Mysql:database:host", "user", "pass") do |dbh| > > # prepare can take a code block, passes the statement handle > # to it, and automatically calls finish at the end of the block > > dbh.prepare("SHOW DATABASES") do |sth| > sth.execute > puts "Databases: " + sth.fetch_all.join(", ") > end > > # execute can take a code block, passes the statement handle > # to it, and automatically calls finish at the end of the block > > dbh.execute("SHOW DATABASES") do |sth| > puts "Databases: " + sth.fetch_all.join(", ") > end > end > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > > I get a bad segfault error: > > /usr/local/lib/ruby/site_ruby/1.8/DBD/Mysql/Mysql.rb:465: [BUG] > Segmentation > fault > ruby 1.8.2 (2004-12-25) [i686-linux] > > Aborted > > Can anyone shed any light on the situation? I am quite stuck on where to > fix > this. > > Thanks in advance > -- > jeffa > > -- jeffa ------=_Part_2854_8490641.1132239346399--