So ... Who has leopard and their rails apps working?

5 views
Skip to first unread message

Matt Allen

unread,
Oct 26, 2007, 4:33:24 AM10/26/07
to rails-...@googlegroups.com
Hi All;

Leopard was a painful upgrade for me, several hours on the phone to apple and ended up doing and archive but all good now.

Anyhoo, thought I'd dive right in and try and start up my apps. Few things to note:

1) mongrel_cluster isnt installed, I assume this wont affect to many dev installs
2) chronic wasn't installed, easy fixed


Now the kicker is mysql, well actually, trying to install the mysql binary gem, it keeps on saying

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
can't find header files for ruby.


so ruby.h doesn't exist anywhere on my system, Just wondering what the "right" way to get it installed may be.

Any ideas?

Matta

Chris Lloyd

unread,
Oct 26, 2007, 5:22:07 AM10/26/07
to rails-...@googlegroups.com
Hi,

I'm not too sure if this will help (I'm just doing a backup before the install), but I saw this earlier today:


In there I think it says that you need to 

export ARCHFLAGS="-arch i386"

before you build mysql. I'd read the page if I were you, it'll give you a better idea about where all your gems are going etc.

Cheers,

Chris

Mike Bailey

unread,
Oct 26, 2007, 10:54:19 AM10/26/07
to Ruby on Rails Oceania
What version of Capistrano is installed? What version of rubygems?

- Mike

Julio Cesar Ody

unread,
Oct 26, 2007, 7:11:27 PM10/26/07
to rails-...@googlegroups.com
Hey Matt,

what about installing Ruby from Macports? Does it work?

Matt Allen

unread,
Oct 26, 2007, 7:12:57 PM10/26/07
to rails-...@googlegroups.com
So I got it working, ended up following the instructions here http://jlaine.net/2006/10/3/installing-ruby-mysql-driver-on-os-x

Bit nasty, but now working.

The list and version of gems installed are here: http://trac.macosforge.org/projects/ruby/wiki/WhatsNewInLeopard

Matta

Matt Allen

unread,
Oct 26, 2007, 7:15:40 PM10/26/07
to rails-...@googlegroups.com
Hey Julio;

That's what I did when i first got my lappy. Worked ok then but was trying to avoid port now, not sure why.

Just as a side note, anyone upgrading to Leopard might want to read this thread:

http://discussions.apple.com/thread.jspa?messageID=5643495#5643495

A bit further down it tells you what to do if you get stuck on a blue screen with a cursor.

I only found this this morning, after doing an archive and install.

Matta

Joseph Pearson

unread,
Oct 26, 2007, 7:23:22 PM10/26/07
to rails-...@googlegroups.com
On 27/10/2007, at 9:15 AM, Matt Allen wrote:

> Hey Julio;
>
> That's what I did when i first got my lappy. Worked ok then but was
> trying to avoid port now, not sure why.
>
> Just as a side note, anyone upgrading to Leopard might want to read
> this thread:
>
> http://discussions.apple.com/thread.jspa?messageID=5643495#5643495
>
> A bit further down it tells you what to do if you get stuck on a
> blue screen with a cursor.

I'm a Mac nerd too these days, but I must say that given this:

http://daringfireball.net/linked/2007/october#fri-26-pc_icon

... the irony of that thread is rather thick and delicious.

Still, at least you get a cursor, I suppose.

Matt Allen

unread,
Oct 26, 2007, 7:26:20 PM10/26/07
to rails-...@googlegroups.com
You can tell the difference between the mac one and the windows one as the mac one is a nice sort of teal colour, where the windows one is BLUE.

It's what i do to remind my boss to change something, set the color to RED or BLUE, seems that MS forgot to change it. I call it geek red.

Matta

marius

unread,
Oct 27, 2007, 5:49:26 PM10/27/07
to Ruby on Rails Oceania
On 27 Okt., 01:12, "Matt Allen" <matt.al...@gmail.com> wrote:
> So I got it working, ended up following the instructions here
> http://jlaine.net/2006/10/3/installing-ruby-mysql-driver-on-os-x
>
> Bit nasty, but now working.

I'm curious! I am still stuck on the "can't find header files for
ruby" part.
But the artikel you mentioned here does not even deal with this
problem (?)

Was it ARCHFLAGS or the $PATH or whatever to get you through with
that? :)

Marius

PS: Sorry for not being Australian ;)


marius

unread,
Oct 28, 2007, 7:18:02 AM10/28/07
to Ruby on Rails Oceania
So, I got it thanks to this:

http://weblog.rubyonrails.org/2007/10/26/today-is-leopard-day

The command for Intel machines line is:

sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-
config=/usr/local/mysql/bin/mysql_config

For PowerPCs change i386 to ppc

thanks folks.

lou

unread,
Nov 11, 2007, 8:28:38 PM11/11/07
to Ruby on Rails Oceania
"can't find header files for ruby"

Install XCode

smamol

unread,
Nov 18, 2007, 7:47:55 PM11/18/07
to Ruby on Rails Oceania
Guys, great work and thank you so much for posting this information!

The trick for me was (MacBook Pro + Leopard)

1. Install XCode 3.0
2. Run: sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-
mysql-config=/usr/local/mysql/bin/mysql_config
3. Choose option 3: mysql 2.7 (ruby)

4. Voila: Building native extensions. This could take a while...
Successfully installed mysql-2.7

YAY :-)
Reply all
Reply to author
Forward
0 new messages