installing ruby mysql with native extensions on mac osx (64 bit)
getting an error `<main>’: undefined method `query’ for #<Mysql:0x00000100913e20> or sort (also for methods init, each etc’) are common for mysql ruby driver that is not installed correctly or without native extensions.
to fix this issue just run the following commands:
1. brew install mysql-connector-c
2. sudo gem install mysql — –with-mysql-lib=/usr/local/mysql/lib
(/usr/local/mysql/lib is my local mysql installation folder)
my stack is
rvm / ruby 1.9.2
mysql Ver 14.14 Distrib 5.5.12, for osx10.6 (i386) using readline 5.1 (64 bit dmg installation from mysql website)
hope it helps .
This entry was posted by daniel on June 30, 2011 at 10:14 am, and is filed under Uncategorized. Follow any responses to this post through RSS 2.0.
Both comments and pings are currently closed.