There must be some obvious explanation that I'm missing, but I can't
figure out why gem install mysql -- as many guides messages instruct
-- wants to install v 2.7 of the adapter. I've tried it on a number
of recently installed systems with recent rubygems, and they all want
to install v 2.7. That version is three and a half years old!
Why aren't the newer versions in the gem list? Why aren't the older
versions available? Do people just use their distribution's mysql
adapter? Is it that 2.7 does the job so nobody bothers to upgrade?
$ gem list --remote mysql
*** REMOTE GEMS ***
mysql (2.7.3, 2.7)
Ok, let's try installing v 2.7.3 as it says that version's available..
$ sudo gem install -v 2.7.3 mysql
ERROR: could not find gem mysql locally or in a repository
Hmm, ok, let's just install it
$ sudo gem install mysql -- --with-mysql-config=`which mysql_config`
Building native extensions. This could take a while...
Successfully installed mysql-2.7
1 gem installed
I wonder what other versions there are
$ gem list --details mysql
*** LOCAL GEMS ***
Installed at: /opt/local/lib/ruby/gems/1.8
MySQL/Ruby provides the same functions for Ruby programs that the
MySQL C API provides for C programs.
Looks like http://www.tmtm.org/en/mysql/ruby/ history has 2.7 released
2005-08-22 (3.5 years ago!), and many newer versions since.