doit, doit now!

doing stuff in a place

DarwinPorts, MySQL5, and Ruby C bindings

Filed under: Geek Out — Nick Hodulik at 6:40 pm on Saturday, April 8, 2006

If you’ve ever tried to install Ruby, Ruby On Rails, MySQL 5, and the Ruby C bindings via DarwinPorts on Mac OS X, you might find yourself running into a weird error. Or three. My particular problem was that the Ruby gem for the MySQL bindings couldn’t find the MySQL5 header files or libraries, and as such the gem would never compile. DarwinPorts uses its own weird little placement for the files, and as such it took me a few minutes to figure out how to get it to build. So, assuming you have a default install of DarwinPorts and have gone through the trouble of installing Ruby and Ruby gems, just do a

gem install mysql — –with-mysql-lib=/opt/local/lib/mysql5/mysql/ –with-mysql-include=/opt/local/include/mysql5/mysql/

and everything should work swimmingly.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>