# Leopard - Newbie to ROR, help please

**URL:** <https://www.ruby-forum.com/t/leopard-newbie-to-ror-help-please/118809>\
**Category:** Rails\
**Created:** [October 31, 2007, 7:04am UTC](https://www.ruby-forum.com/t/leopard-newbie-to-ror-help-please/118809 "2007-10-31T07:04:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gareth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@Gareth](https://www.ruby-forum.com/u/Gareth)\
**Post date:** [October 31, 2007, 7:04am UTC](https://www.ruby-forum.com/t/leopard-newbie-to-ror-help-please/118809/1 "2007-10-31T07:04:16Z")

</div>

Hi guys and gals,

I’ve upgraded to leopard (clean install) and was under the impression  
that as ROR comes built into leopard I’d have no problems getting set  
up.

I’ve updated it using:

gem update rails

That went fine.

Now I want to install MySQL. I’ve run:

sudo gem install mysql and I choose the 3rd option (MySQL 2.7  
(ruby))

and get the following error:

Building native extensions. This could take a while…  
ERROR: While executing gem … (Gem::Installer::ExtensionBuildError)  
ERROR: Failed to build gem native extension.

ruby extconf.rb install mysql – --with-mysql-config=/usr/local/mysql/  
bin/mysql\_config  
extconf.rb:1: command not found: /usr/local/mysql/bin/mysql\_config –  
cflags  
\*\*\* extconf.rb failed \*\*\*  
Could not create Makefile due to some reason, probably lack of  
necessary libraries and/or headers. Check the mkmf.log file for more  
details. You may need configuration options.

Provided configuration options:  
–with-opt-dir  
–without-opt-dir  
–with-opt-include  
–without-opt-include=${opt-dir}/include  
–with-opt-lib  
–without-opt-lib=${opt-dir}/lib  
–with-make-prog  
–without-make-prog  
–srcdir=.  
–curdir  
–ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/  
ruby  
–with-mysql-config

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/  
mysql-2.7 for inspection.  
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.7/gem\_make.out

Can anyone help me?

Thanks

---

<div class="post-metadata">

**Author:** ![Gareth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@Gareth](https://www.ruby-forum.com/u/Gareth)\
**Post date:** [October 31, 2007, 7:58pm UTC](https://www.ruby-forum.com/t/leopard-newbie-to-ror-help-please/118809/2 "2007-10-31T19:58:40Z")

</div>

Hi Greg,

Thanks, you’ve hit it right on the button. I was confused as to  
whether the gem was actually installing a different version of mysql  
that was specially adapted to ROR or whether it was - as you say -  
just installing an adapter. This answers my question. I will wait  
until MySQL for leopard is released as people are having issues trying  
to install the tiger package.

Thanks very much

Gareth

---

<div class="post-metadata">

**Author:** ![Gareth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@Gareth](https://www.ruby-forum.com/u/Gareth)\
**Post date:** [October 31, 2007, 8:17pm UTC](https://www.ruby-forum.com/t/leopard-newbie-to-ror-help-please/118809/3 "2007-10-31T20:17:15Z")

</div>

Gareth wrote:

> Thanks, you’ve hit it right on the button. I was confused as to  
> whether the gem was actually installing a different version of mysql  
> that was specially adapted to ROR or whether it was - as you say -  
> just installing an adapter. This answers my question. I will wait  
> until MySQL for leopard is released as people are having issues trying  
> to install the tiger package.

Once you get around to it, note the following: (taken from Riding Rails)

"The only minor snag is that in order to install the MySQL C bindings  
for Ruby, you have to be quite particular on the command line. Here’s  
the cheat line you need to install (read more at macosforge):

sudo env ARCHFLAGS=“-arch i386” gem install mysql –  
–with-mysql-config=/usr/local/mysql/bin/mysql\_config"

–  
Roderick van Domburg  
[http://www.nedforce.com](http://www.nedforce.com)

---

<div class="post-metadata">

**Author:** ![Gareth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@Gareth](https://www.ruby-forum.com/u/Gareth)\
**Post date:** [October 31, 2007, 8:07am UTC](https://www.ruby-forum.com/t/leopard-newbie-to-ror-help-please/118809/4 "2007-10-31T08:07:57Z")

</div>

On Oct 30, 2007, at 11:03 PM, Gareth wrote:

> Now I want to install MySQL. I’ve run:  
> ruby extconf.rb install mysql – --with-mysql-config=/usr/local/mysql/  
> bin/mysql\_config  
> extconf.rb:1: command not found: /usr/local/mysql/bin/mysql\_config –  
> cflags  
> \*\*\* extconf.rb failed \*\*\*  
> Could not create Makefile due to some reason, probably lack of  
> necessary libraries and/or headers. Check the mkmf.log file for more  
> details. You may need configuration options.

Without intending to insult your intelligence, I just want to clarify  
that you know ‘gem install mysql’ doesn’t install the actual MySQL  
database, it installs an adaptor to have ruby talk to MySQL, and you  
don’t need to install that for Rails’ benefit (only if you wanted to  
write raw Ruby, without Rails, and have it connect to MySQL).

That said, if you thought you were installing MySQL, you can get that  
from [www.mysql.com/downloads/](http://www.mysql.com/downloads/). If you were in fact trying to install  
the mysql-ruby adaptor, and you happen to have a PowerPC Mac, then  
the gem installer will not work. Follow the instructions in this  
article:

[http://www.railsdev.ws/blog/9/compiling-mysql-ruby-for-powerpc/](http://www.railsdev.ws/blog/9/compiling-mysql-ruby-for-powerpc/)

If I’ve guessed incorrectly about any of your intents, I appologize.

– gw

---

<div class="post-metadata">

**Author:** ![Gareth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@Gareth](https://www.ruby-forum.com/u/Gareth)\
**Post date:** [November 1, 2007, 11:17pm UTC](https://www.ruby-forum.com/t/leopard-newbie-to-ror-help-please/118809/5 "2007-11-01T23:17:11Z")

</div>

On Oct 31, 2:58 pm, Gareth [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi Greg,

[…]

> I will wait  
> until MySQL for leopard is released as people are having issues trying  
> to install the tiger package.

I don’t have Leopard yet (just ordered it), so I can’t speak from  
experience, but you might want to take a look at  
[http://www.luismajano.com/blog/index.cfm/2007/10/30/Getting-MySQL-to-work-with-Leopard-MySQL-on-Leopard](http://www.luismajano.com/blog/index.cfm/2007/10/30/Getting-MySQL-to-work-with-Leopard-MySQL-on-Leopard)  
.

You should probably be using PostgreSQL anyway. 🙂

## Best,

Marnen Laibow-Koser  
Composer / Web developer  
Albany, NY, US  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Gareth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@Gareth](https://www.ruby-forum.com/u/Gareth)\
**Post date:** [November 1, 2007, 11:46pm UTC](https://www.ruby-forum.com/t/leopard-newbie-to-ror-help-please/118809/6 "2007-11-01T23:46:28Z")

</div>

Hi Greg

If I were you I would install Darwin ports. Its similar to package  
managers on other \*nix flavours and it can install MySQL and any  
dependencies automatically for you.

It is available at [Welcome darwinports.com - Justhost.com](http://darwinports.com/download/). Dead easy to  
install.

Once installed, open up terminal and type

```
 sudo port install mysql mysql-server

```

It’ll do it for you. Likewise if you ever want to update/install ruby  
you can do

```
sudo port install ruby

```

and so on. Hope this helps!

---

<div class="post-metadata">

**Author:** ![Gareth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@Gareth](https://www.ruby-forum.com/u/Gareth)\
**Post date:** [November 2, 2007, 1:56am UTC](https://www.ruby-forum.com/t/leopard-newbie-to-ror-help-please/118809/7 "2007-11-02T01:56:10Z")

</div>

Please do NOT use DarwinPorts because that is a fake site that is a  
pseudo version. DarwinPorts has been discontinued and moved to  
MacPorts. It is hosted by Apple now. [http://www.macports.org](http://www.macports.org) I have a  
good tutorial on my site for installing a solid rails stack via  
MacPorts on my blog.

[http://www.sysadminschronicles.com](http://www.sysadminschronicles.com)

Enjoy.  
-Ron
