# Ruby MySQL Gem uses older client library

**URL:** <https://www.ruby-forum.com/t/ruby-mysql-gem-uses-older-client-library/101001>\
**Category:** Ruby\
**Created:** [August 2, 2006, 5:03pm UTC](https://www.ruby-forum.com/t/ruby-mysql-gem-uses-older-client-library/101001 "2006-08-02T17:03:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul-au](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f475e1/32.png) [@paul-au](https://www.ruby-forum.com/u/paul-au)\
**Post date:** [August 2, 2006, 5:03pm UTC](https://www.ruby-forum.com/t/ruby-mysql-gem-uses-older-client-library/101001/1 "2006-08-02T17:03:28Z")

</div>

Hi there, can ayone enlighten me on why I Ruby (using MySQl gem) would  
use an older client library.

I have an XP box for developing and an Ubuntu box for deployment.

Both have 5.x clients installed. The ubuntu still has older clients as  
well.

Some code I have written requires the 5.x client. This code runs on the  
XP box but not on the Ubuntu box (apart from this glitch other Ruby /  
Mysql works fine)

In investigating the issue I ran IRB, required ‘mysql’ and called  
Mysql.get\_client\_version. The version reported on Ubuntu was a 4.x  
driver, the version on XP the correct 5.x driver.

Ubuntu’s libraries and config are correctly set at 5.x and symlinks  
point to correct libraries.

I am thinking I may have installed the 5.x client after I has installed  
the 2.7 mysql gem, would this ‘lock’ the Gem to the older client? Do I  
need to re-install / rebuild the Gem??

Any help appreciated, thanks.

Paul

ps I tried searching forum first but search is disabled, apologies if  
this has been asked before. I tried googling to no avail.

---

<div class="post-metadata">

**Author:** ![paul-au](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f475e1/32.png) [@paul-au](https://www.ruby-forum.com/u/paul-au)\
**Post date:** [August 3, 2006, 12:45pm UTC](https://www.ruby-forum.com/t/ruby-mysql-gem-uses-older-client-library/101001/2 "2006-08-03T12:45:50Z")

</div>

Paul,

You will probably need to reinstall the MySQL gem. When that gem  
installs,  
it compiles native extensions based on your current MySQL libraries. If  
you  
upgrade MySQL, you have to recompile the gem.

Jeff

---

<div class="post-metadata">

**Author:** ![paul-au](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f475e1/32.png) [@paul-au](https://www.ruby-forum.com/u/paul-au)\
**Post date:** [August 3, 2006, 2:35pm UTC](https://www.ruby-forum.com/t/ruby-mysql-gem-uses-older-client-library/101001/3 "2006-08-03T14:35:13Z")

</div>

Jeff Everett wrote:

> Paul,
> 
> You will probably need to reinstall the MySQL gem. When that gem  
> installs,  
> it compiles native extensions based on your current MySQL libraries. If  
> you  
> upgrade MySQL, you have to recompile the gem.
> 
> Jeff

Thanks very much Jeff.

Regards,

Paul
