Andrew Ohnstad wrote: > Gerardo Santana Gómez Garrido wrote: >> You're mixing 32-bit and 64-bit libraries. > My MySQL installation is 64 bit, and so as a result so are its > libraries. > > My Ruby installation is, indeed, a 32 bit install. That's how the > package I installed compiled it. I tried changing that by recompiling > in 64 bit mode early in this whole saga, but it was an absolute > nightmare. I don't think the make files of most of the Ruby libraries > play nicely with 64 bit compile options. > > I suppose I could install the libraries from a 32bit MySQL installation > and rebuild the gem based on those... > I tried this as well. I got the MySQL libraries off a Solaris x86 32 bit machine and copied over to my 64 bit machine. But after installing the gem, the mysql.so is still 64 bit. root@trinity:/opt/mysql/mysql/lib/32# file libmysqlclient.so libmysqlclient.so: ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped root@trinity:/opt/mysql/mysql/lib/32# gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config --with-mysql-lib=/usr/local/mysql/lib/32 Building native extensions. This could take a while... Successfully installed mysql-2.7 1 gem installed root@trinity:/opt/mysql/mysql/lib/32# file /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.so /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.so: ELF 64-bit LSB dynamic lib AMD64 Version 1, dynamically linked, not stripped, no debugging information available root@trinity:/opt/mysql/mysql/lib/32# I'm about to give up and just reinstall mysql in 32 bit mode, but I don't want to give up whatever little speed edge I'm getting from the 64 bit version. I can't be the first person to use sunfreeware ruby with official mysql... -- Posted via http://www.ruby-forum.com/.