Ryan Carmelo Briones

mostly harmless

getting rails on a tiger September 27, 2006

Confused? Me too. Actually, I'm writing this because I've had a heck of a time installing everything that Ruby on Rails needs to get going on on my MacBook Pro. Thank God for HowtoInstallOnOSXTiger and HowtoInstallOnOSXTigerUsingDarwinPorts from the Rails wiki, or I probably wouldn't have gotten anywhere with this. There are some key observations that I have made that are not yet included in those HowTos:

  • The HowTo "UsingDarwinPorts" does includes the "server" variant when install mysql, but the "OnOSXTiger" does not. I also installed MySQL5 since they put it as their GA production release and it has some new features I may want to mess with. So I used

    $ sudo port install mysql5 +server

    when I installed MySQL

  • As far as I can tell almost everything installed with MySQL5 using DarwinPorts has a "5" appended to the normal file name, so "mysql" client becomes "mysql5" and "mysql_config" becomes "mysql_config5"

  • When doing gem install mysql I was presented with a few versions to choose from. I chose 2.7, since it was the latest, but after all the different iterations of switches and whatnot trying to make it work it turns out I was doing the right thing from the beginning, with the exception of not doing this first:

    $ sudo gcc_select 4.0

    This, apparently, is crucial, more specifically I'm assuming MySQL5 requires it. The DarwinPort I installed probably had this already setup in the config file. Some gems I hear need gcc 3.9 in order to work, so be looking at for that. Also I used the switch --with-mysql-config=/opt/local/bin/mysql_config5 noting the "5" at the end again.

After all that everything went smoothly. All that's left is to put it to work! hehe. I do love my Mac, though. :)