• Ruby on Rails on Snow Leopard

    by  • October 18, 2009 • Code, OS X • 0 Comments

    I finally tackled the (hopefully) last bit of my Snow Leopard upgrade today: getting Ruby (and Rails) ready to go. I’m working on an information visualization project and am using Ruby to write the app. Mike Gunderloy at A Fresh Cup has a great step by step guide (I started at step 19 since I was happy to upgrade in place):

    Migrating to Snow Leopard for Rails Development

    As always happens when upgrading or installing, it seems, I did run into a few problems.

    Errors and Workarounds

    Problem: Git doesn’t want to install.

    Error:

    ld: warning: in /opt/local/lib/libiconv.dylib, file is not of required architecture

    Workaround:

    MacPorts is to blame. To uninstall MacPorts, use


    sudo rm -rf
    /opt/local
    /etc/manpaths.d/macports
    /etc/paths.d/macports
    /Applications/DarwinPorts
    /Applications/MacPorts
    /Library/LaunchDaemons/org.macports.*
    /Library/Receipts/DarwinPorts*.pkg
    /Library/Receipts/MacPorts*.pkg
    /Library/StartupItems/DarwinPortsStartup
    /Library/Tcl/darwinports1.0
    /Library/Tcl/macports1.0

    (Thanks, Simon Engledew)

    Problem: MySQL gem doesn’t install.

    Error:

    ERROR: Failed to build gem native extension mysql

    Workaround:

    Make sure you installed the latest version of MySQL, the MySQL Preference Pane, and that you started the MySQL server before trying to install the gem. iCoreTech has directions for installing MySQL and MySQL gem on Snow Leopard.

    Other Options

    HiveLogic has another method for installing Git on Snow Leopoard. I was having trouble with the package installers, and doing it “by hand” via HiveLogic’s instructions worked well.

    My project uses RMagick. RMagick’s DMG installer wouldn’t work for me either. I was able to install RMagick from source using a script from OnRails.org.

    About

    Leave a Reply