1. rails stack under OS X Snow Leopard

    Upgrading to OS X.6 “Snow Leopard” will force you to reinstall some elements. Here is a quick list of the things to do to (re)install rails (and zena) on Snow Leopard.

    xcode

    Since you will need to build native extensions and binaries, you need to install the Xcode tools located on the Snow Leopard install DVD under Optional Installs/Xcode.mpkg

    cleanup

    In case you have installed gems from an older version of OS X:

    # sudo gem uninstall mysql ruby-debug ruby-debug-base linecache rmagick json

    If you have an older macports installation, you
    should prune it to avoid problems with incompatible port builds:

    # sudo rm -rf /opt/local

    prepare rubygems

    sudo gem update --system

    mysql

    Currently only MySQL is supported by zena (this will change soon) and you need to install the x86_64 version from dev.mysql.org.

    Once the x86_64 is installed, you might need to recover your ‘data’ folder. Look into /usr/local (you might see many mysql-5xx folders. Look inside these to find your old data folder and move it into the latest mysql folder for example:

    # sudo mv mysql/data mysql/data.bak
    # mv mysql-5.1.30-osx10.5-x86/data mysql/
    

    mysql gem

    sudo env ARCHFLAGS="-arch x86_64" gem install mysql

    imagemagick

    The best way to install the image manipulation library is to use macports for Snow Leopard to enable good image support (png, jpeg, etc). Make sure you prune your old macports installation before installing. Once the pkg is installed:

    # sudo port selfupdate
    # sudo port install libpng jpeg libxml2 zlib ImageMagick

    This will take quite a long time (~45 minutes on a core2duo @ 2.8Ghz), just let it run…

    # sudo gem install rmagick

    other gems

    # sudo gem install ruby-debug ruby-debug-base linecache json

    If you are upgrading to Snow Leopard you should be done. If you are doing a clean install, please read the dependencies page (gem chapter).

    Gaspard Bucher

    comments

    1. leave a comment