# Ruby / osx / mysql

**URL:** <https://www.ruby-forum.com/t/ruby-osx-mysql/70584>\
**Category:** Ruby\
**Created:** [September 30, 2006, 2:30pm UTC](https://www.ruby-forum.com/t/ruby-osx-mysql/70584 "2006-09-30T14:30:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 30, 2006, 2:30pm UTC](https://www.ruby-forum.com/t/ruby-osx-mysql/70584/1 "2006-09-30T14:30:15Z")

</div>

hi list -

on windows i was able to install mysql drivers for ruby simply with gem.

on osx, these seem not to work (pure ruby drivers) with current  
versions of mysql… is it really true i have to go through compiling  
/ make / make instal etc to get mysql working with ruby on OSX?

did this once, but have a few machines to setup.

after compiling, where do the libraries end up? are they compiled  
specific to each mac, or can the libs just be copied with eg a full  
ruby/lib/ directory tree from one mac to another?

thanks for any tips!

## /dc

* * *

```
  David "DC" Collier

```

[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
+81 (0)80 6521 9559  
skype: callto://d3ntaku

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 30, 2006, 2:50pm UTC](https://www.ruby-forum.com/t/ruby-osx-mysql/70584/2 "2006-09-30T14:50:18Z")

</div>

dc wrote:

> after compiling, where do the libraries end up? are they compiled  
> specific to each mac, or can the libs just be copied with eg a full  
> ruby/lib/ directory tree from one mac to another?
> 
> thanks for any tips!
> 
> /dc

This will help you:

> **[Dan Benjamin](https://danbenjamin.com)**
>
> Dan Benjamin's personal website.

Good luck.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 30, 2006, 3:08pm UTC](https://www.ruby-forum.com/t/ruby-osx-mysql/70584/3 "2006-09-30T15:08:20Z")

</div>

hiya -

> > after compiling, where do the libraries end up? are they compiled  
> > specific to each mac, or can the libs just be copied with eg a full  
> > ruby/lib/ directory tree from one mac to another?

> This will help you:  
> [Dan Benjamin](http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger)

yes, i went through that process already and it works on my local  
machine (in fact i think someone else has a shell script that does the  
whole thing).

but it seems unlikely that all the people doing ruby/rails dev on osx  
are compiling mysql drivers, so i thought i must be missing something.

/dc

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 30, 2006, 3:34pm UTC](https://www.ruby-forum.com/t/ruby-osx-mysql/70584/4 "2006-09-30T15:34:21Z")

</div>

dc wrote:

> machine (in fact i think someone else has a shell script that does the  
> whole thing).
> 
> but it seems unlikely that all the people doing ruby/rails dev on osx  
> are compiling mysql drivers, so i thought i must be missing something.
> 
> /dc

i dont see the problem.

you can use locomotive[1] if you dont want to intall x-code with gcc.

it lets you create rails enviroments with a few mouseclicks (OS X only)

though, last time i used it, it was not up to date (regarding rails)

and you still have to get mysql up and runnning, there might be (i  
dont know) some mysql shipping with os, but i’d install a recent  
version.

[1] [http://locomotive.raaum.org/](http://locomotive.raaum.org/)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 30, 2006, 6:24pm UTC](https://www.ruby-forum.com/t/ruby-osx-mysql/70584/5 "2006-09-30T18:24:38Z")

</div>

You can install rb-mysql 2.7.1 via ports, for some reason gems only  
has 2.7.0.

12:21:06~[14]\>port installed | grep mysql  
mysql5 @5.0.24\_0+darwin\_8+server (active)  
rb-mysql @2.7.1\_0 (active)

Working out great for me, with no hand compiling.
