# Mysql gem: version specification and update problem

**URL:** <https://www.ruby-forum.com/t/mysql-gem-version-specification-and-update-problem/122890>\
**Category:** Ruby\
**Created:** [December 12, 2007, 7:26pm UTC](https://www.ruby-forum.com/t/mysql-gem-version-specification-and-update-problem/122890 "2007-12-12T19:26:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stepheneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71e660/32.png) [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Post date:** [December 12, 2007, 7:26pm UTC](https://www.ruby-forum.com/t/mysql-gem-version-specification-and-update-problem/122890/1 "2007-12-12T19:26:37Z")

</div>

The mysql gem has unfortunate interaction between gem versions,  
platforms, and updating on macosx. I’m trying to figure out if it is  
a problem with rubygems or the specification for the mysql gem itself.

The latest version of the mysql gem for the mac is v2.7 while the  
latest version is 2.7.3.

$ gem list mysql -r

\*\*\* REMOTE GEMS \*\*\*

mysql (2.7.3, 2.7.1, 2.7, 2.6, 2.5.1)  
mysql\_replication\_adapter (0.4.0, 0.2.0, 0.1.1, 0.1.0)  
mysql\_retry\_lost\_connection (0.0.1)

After I install the mysql gem on my mac any future use of the command:

sudo gem update

assumes the mysql gem is not up-to-date and tries to re-install it.

Previously I would just be presented with a console request asking if  
I wanted to update the mysql gem – there was actually no update for  
the mac and I would just answer no.

Now because dependencies are automatically followed it is always  
getting rebuilt.

This would just be a waste of bandwidth and processing except that  
successfully compiling the mysql gem on macosx requires setting an  
env variable … so everytime I update all my gems the mysql gem  
rebuild of it’s native libraries fails.

I’m finding this problem on: MacOS X 10.4.11, ruby 1.8.6p11, rubygems  
v0.9.5

Is this a bug in rubygems or in how the mysql gem is specified?

---- example ----

$ sudo gem uninstall mysql  
Successfully uninstalled mysql-2.7

$ sudo gem install mysql – --with-mysql-dir=/usr/local/mysql  
Building native extensions. This could take a while…  
Successfully installed mysql-2.7  
1 gem installed

$ gem outdated

$ sudo gem update  
Updating installed gems…  
Attempting remote update of mysql  
Building native extensions. This could take a while…  
ERROR: Error installing mysql:  
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb update  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lm… yes  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lz… yes  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lsocket… no  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lnsl… no  
checking for mysql\_query() in -lmysqlclient… no

Gem files will remain installed in  
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.  
Results logged to  
/usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/gem\_make.out  
Gems: [mysql] updated

---

<div class="post-metadata">

**Author:** ![stepheneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71e660/32.png) [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Post date:** [December 12, 2007, 7:29pm UTC](https://www.ruby-forum.com/t/mysql-gem-version-specification-and-update-problem/122890/2 "2007-12-12T19:29:37Z")

</div>

On Dec 11, 2007, at 07:45 AM, Stephen B. wrote:

> The mysql gem has unfortunate interaction between gem versions,  
> platforms, and updating on macosx. I’m trying to figure out if it is  
> a problem with rubygems or the specification for the mysql gem itself.

The correct place to report a bug on RubyGems is on the tracker.

---

<div class="post-metadata">

**Author:** ![stepheneb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/71e660/32.png) [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Post date:** [December 12, 2007, 8:15pm UTC](https://www.ruby-forum.com/t/mysql-gem-version-specification-and-update-problem/122890/3 "2007-12-12T20:15:38Z")

</div>

> On Dec 11, 2007, at 07:45 AM, Stephen B. wrote:
> 
> > The mysql gem has unfortunate interaction between gem versions, platforms, and updating on macosx. I’m trying to figure out if it is a problem with rubygems or the specification for the mysql gem itself.
> 
> The correct place to report a bug on RubyGems is on the tracker.

Thanks for responding Eric,

I didn’t know if it was a problem in rubygems or in the gem  
specification for the mysql gem. You didn’t explicitly answer that  
question but I’ll assume you think it’s likely a bug in rubgems.

Here’s a link to the bug report in the rubyforge tracker for rubygems.

[http://rubyforge.org/tracker/index.php?func=detail&aid=16244&group\_id=126&atid=575](http://rubyforge.org/tracker/index.php?func=detail&aid=16244&group_id=126&atid=575)
