http://ore.saizensen.net/archives/category/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88/ruby
これを参考にソースを修正したらmake installは通ったが gem listをやっても一覧に出てこない。うーむ。
(追記終わり)
http://d.hatena.ne.jp/kurusaki/20080716/p1
こちらにかかれたあったとおり、やってもtigerで通らない。(ちなみに本番環境のcent os5ではとおった)
sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Password:
Updating metadata for 204 gems from http://gems.rubyforge.org/
............................................................................................................................................................................................................
complete
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 install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
checking for mysql_ssl_set()... yes
checking for mysql.h... yes
creating Makefile
make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.11.1 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_H -I/usr/local/mysql/include -Os -arch i386 -fno-common -fno-common -g -O2 -pipe -fno-common -c mysql.c
mysql.c: In function ‘Init_mysql’:
mysql.c:2015: error: ‘ulong’ undeclared (first use in this function)
mysql.c:2015: error: (Each undeclared identifier is reported only once
mysql.c:2015: error: for each function it appears in.)
mysql.c:2015: error: parse error before numeric constant
mysql.c:2018: error: parse error before numeric constant
make: *** [mysql.o] Error 1
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