mysql gem: version specification and update problem

S

Stephen Bannasch

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
 
E

Eric Hodel

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.
 
S

Stephen Bannasch

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top