Home Contact Sitemap

Preston Lee

Founder, CEO, OpenRain.com

About

During the day I run OpenRain in Phoenix: a Ruby on Rails development shop. During the night... well... I still have to run OpenRain, but when I find time to breathe, I exhale here. If you'd like to get in touch professionally, don't hesitate to contact me via the OpenRain website.

Peace,

Preston

Installing The MySQL Ruby Gem When Using The Official MySQL .dmg

If you installed MySQL using the official .dmg package provided by MySQL AB/Sun and are trying to install the native MySQL gem, you’ll need to pass a bunch of flags to the gem install process to get the thing to compile. Try this..

sudo gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config

..if you still have issues (check your /opt/local/lib/ruby/gems/<ruby_ver>/gems/mysql-<gem_ver>/mkmf.log file), try this instead..

sudo gem install mysql — –with-mysql-dir=/usr/local/mysql –with-mysql-include=/usr/local/mysql/include/ –with-mysql-lib=/usr/local/mysql/lib/ –with-mysql-config=/usr/local/mysql/bin/mysql_config

Run `sudo gem install mysql` and definitely recheck the log file again as the gem install process sometimes reports false positives even if native components fail to install.

Share/Save/Bookmark

Tags: , , , , , ,

. 12 Aug 08 | Computer | Comments (0)