Ruby MySQL bindings for Intel Macs

Posted by Peter Burkholder Fri, 17 Nov 2006 22:47:00 GMT

Stefan Saasen points out that the Ruby MySQL bindings are broken on Intel Macs.

Here’s my version of the fix:


sudo gem install mysql -- --include=/opt/local
# select option 2 for Ruby 2.7, it will fail to build
cd /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7
sudo ruby extconf.rb install mysql -- --with-mysql-dir=/opt/local
vim mysql.c
# now here's where you add the line '#define ulong unsigned long' 
# just before the line '#define MYSQL_RUBY_VERSION...'
sudo make
sudo make install
Trackbacks

Use the following link to trackback from your own site:
http://typo.pburkholder.com/trackbacks?article_id=907

Leave a comment

Comments