Skip to content

Instantly share code, notes, and snippets.

Created August 17, 2010 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/530125 to your computer and use it in GitHub Desktop.
Save anonymous/530125 to your computer and use it in GitHub Desktop.
Mysql gem under OSX:
Install:
$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Or, 64-bit:
$ sudo env ARCHFLAGS="-arch x86_64" gem install -V mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Or, with MacPorts, mysql5 and mysql5-devel installed, this might work (or try 64-bit)
$ sudo gem install -V mysql -- --with-mysql-config=/opt/local/bin/mysql_config5
testing it:
$ irb
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'mysql_api'
=> true
irb(main):003:0> Mysql.get_client_info
=> "5.1.34"
irb(main):004:0> Mysql.get_client_version
=> 50134
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment