Reinstall ruby's MySQL Library on OS X Server

Hello,
I am running OS X Server version 10.4.6 and I already have some MySQL
databases working on the server. I install the RubyGem recently,
however, it does not work correctly with the default MySQL.

I am wondering if anybody can shed some light on:
1): how to reinstall ruby’s mysql library on the OS X server,
2): Is it possible to keep the old database files intact while
reinstall ruby’s mysql library.

Thanks in advance,

-Hongbin

On May 11, 2006, at 12:26 PM, Hon Bin wrote:

Thanks in advance,

-Hongbin

Hongbin-

The easiest way to install the mysql gem on OSX is as follows.

run this command
$ which mysql_config

If that returns a result then you are good to go. SO now install the
mysql gem:

$ sudo gem install mysql – --with-mysql-config

The extra – are important. You can safely do this without harming
your mysql database contents.

-Ezra

Ezra,

Thank you for the tips.
I hate to bother you with this, but when I try to fix it based upon
what you told me, I got the following message:

$ which mysql_config
/usr/bin/mysql_config
$ sudo gem install mysql --with-mysql-config
ERROR: While executing gem … (OptionParser::InvalidOption)
invalid option: --with-mysql-config

Any idea?

Thanks again!
Hongbin

Note that Ezra’s command has TWO occurrences of ‘–’, but you only
did one. The first – tells the gem command to pass the remaining
parameters to the command that builds the native gem.