# Native mysql gem vs pure-ruby gem (determing which is being

**URL:** <https://www.ruby-forum.com/t/native-mysql-gem-vs-pure-ruby-gem-determing-which-is-being/106750>\
**Category:** Rails\
**Created:** [June 13, 2007, 8:06pm UTC](https://www.ruby-forum.com/t/native-mysql-gem-vs-pure-ruby-gem-determing-which-is-being/106750 "2007-06-13T20:06:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![phallstrom](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f475e1/32.png) [@phallstrom](https://www.ruby-forum.com/u/phallstrom)\
**Post date:** [June 13, 2007, 8:06pm UTC](https://www.ruby-forum.com/t/native-mysql-gem-vs-pure-ruby-gem-determing-which-is-being/106750/1 "2007-06-13T20:06:01Z")

</div>

Hi all -

I just experienced a problem I didn’t even realize I had. The problem  
was  
that I have installed the native mysql gem, but it wasn’t being used. I  
base this on this post:

[http://blog.duncandavidson.com/2005/07/rails\_and\_mysql.html](http://blog.duncandavidson.com/2005/07/rails_and_mysql.html)

I tried that on my mac and it returned true. Looking through  
/usr/local/lib/ruby for mysql.so revealed that it was in a different  
spot  
on my mac than on my linux box.

Specifically, the file:

/usr/local/lib/ruby/site\_ruby/1.8/i686-linux/mysql.so

did not exist. While it did (with slight path change) on my mac.

I copied the file from:

/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.so

and checked again and it was now using that driver. It also reported an  
error relating to /etc/my.cnf (local sock) which seems to also confirm  
it.

I’m saying all this because I had thought the gem was installed. I had  
confirmed the .so file was created, etc. But it still wasn’t being  
used.

And perhaps some other folks have the same issue. Or not. 🙂

-philip
