# Mysql gem on Mac OSX 10.4

**URL:** <https://www.ruby-forum.com/t/mysql-gem-on-mac-osx-10-4/134664>\
**Category:** Ruby\
**Created:** [April 13, 2008, 5:59pm UTC](https://www.ruby-forum.com/t/mysql-gem-on-mac-osx-10-4/134664 "2008-04-13T17:59:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukasmosser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/4af34b/32.png) [@lukasmosser](https://www.ruby-forum.com/u/lukasmosser)\
**Post date:** [April 13, 2008, 5:59pm UTC](https://www.ruby-forum.com/t/mysql-gem-on-mac-osx-10-4/134664/1 "2008-04-13T17:59:32Z")

</div>

Ok so I just installed ruby and rails and everything everything would  
work also got a test server working.  
I already have mysql installed on my Mac (it’s a macbook pro) now when I  
either try to configure my ruby (I don’t know where) or when I try to  
install the mysql gem I always get error messages…

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-dir=/usr/local/mysql  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lm… yes  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lz… yes  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lsocket… no  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lnsl… no  
checking for mysql\_query() in -lmysqlclient… no

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

I have Xcode installed obviously but somehow this doesn’t work…

Would be great if you could help!  
Thanks!

Lukas

---

<div class="post-metadata">

**Author:** ![lukasmosser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/4af34b/32.png) [@lukasmosser](https://www.ruby-forum.com/u/lukasmosser)\
**Post date:** [April 15, 2008, 7:19am UTC](https://www.ruby-forum.com/t/mysql-gem-on-mac-osx-10-4/134664/2 "2008-04-15T07:19:10Z")

</div>

Traditionally I have to build it using  
gem install mysql – --mysql-config=/whatever/mysql\_config5 # or  
wherever your msql config binary is  
GL!  
-R

> checking for mysql\_query() in -lmysqlclient… no
