Saari Development

Ali Rizvi's Technical Blog as a Professional Software Development Engineer

Rails: Working around Tiger (OS X 10.4) ruby mysql problem

with 2 comments

I was not happy when I found myself stuck try to run scaffolding for the first time, discovering that my previous attempt to fix preinstalled Tiger ruby and that after installing Xcode 2.2 I don’t have ruby.h where fixrubyconfig expects (as per the most famous fix Complete Fix for Ruby on Mac OS X 10.4 Tiger which is also mentioned in Agile Web Development with Rails

I was partly heart broken and partly frustrated and hoped that some mac and ruby ‘guru’ at the upcoming Seattle.rb Hack Night can help.

But then I had a thought and it worked.

I installed the latest stable version of ruby (1.8.3):
Download from:

shell> tar -zxvf ruby-1.8.3.tar.gz
shell> cd ruby-1.8.3
shell> ./configure
shell> make -j5
shell> sudo make install

This installs the new version of ruby in the /usr/local/bin directory on your powerbook

Now I added the new ruby path to my $PATH using
export PATH=/usr/local/bin:$PATH
this would mean that any time a issue a command it would look in /usr/local/bin before /usr/bin where the old (tiger default version is installed). I have also modified my .profile to have a similar PATH in future.

then I downloaded and installed rubygem again:
Download from:

shell> tar -zxvf rubygems-0.8.11.tgz
shell> cd rubygems-0.8.11
shell> sudo ruby setup.rb

Next I installed rails gem

shell> sudo gem install rails --include-dependencies

Next I installed mysql gem

shell> sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql/

it worked for the first time now giving me a successfully installed message.

Finally I was able to do my scaffolding task as suggested by the book:
from your rails app directory do the following for the existing product table

shell> ruby script/generate scaffold Product Admin

It seems that the on Mac OS X you require a username in your database.yml file (you can’t leave it blank otherwise it would default to root) so I had to modify my configuration on last time before seeing the magical command work.


Written by imsaar

December 12, 2005 at 3:08 am

Posted in general

2 Responses

Subscribe to comments with RSS.

  1. Every so often a post like Rails: Working around Tiger (OS X 10.4) ruby mysql problem grabs my attention while I’m chasing around for the latest
    and greatest info about self improvement tapes . And what a pleasure to read someone who apparently not only knows what they’re talking about, but apparently also walks the talk. Thank you Ali . Is there any chance you’ll be commenting on self improvement tapes at any stage?


    December 23, 2005 at 5:08 pm

  2. Hello Ali, I was searching for some info on make money at home and stumbled across your blog. Even though Rails: Working around Tiger (OS X 10.4) ruby mysql problem was different than what I thought, it was different enough to get my attention. I really don’t understand how I got your page while looking for make money at home. Anywho I loved your blog and am very happy I stopped by. Thanks for the interesting read.


    January 17, 2006 at 8:09 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: