Forum: Ruby on Rails Reinstall ruby's MySQL Library on OS X Server

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Hon Bin (Guest)
on 2006-05-11 23:29
(Received via mailing list)
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,

Ezra Z. (Guest)
on 2006-05-12 00:28
(Received via mailing list)
On May 11, 2006, at 12:26 PM, Hon Bin wrote:

> Thanks in advance,
> -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.

Hon Bin (Guest)
on 2006-05-12 00:48
(Received via mailing list)

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
$ sudo gem install mysql --with-mysql-config
ERROR:  While executing gem ... (OptionParser::InvalidOption)
    invalid option: --with-mysql-config

Any idea?

Thanks again!
Derek C. (Guest)
on 2006-05-12 15:01
(Received via mailing list)
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.
This topic is locked and can not be replied to.