Iamvery

The musings of a nerd


Bootstrapping OS X 1.9 (Mavericks) for Development

— Nov 05, 2013

Warning: This post was birthed out of a place of deep frustration after hours of trying to get my development environment back up and running for my work post-upgrade.

Upgrading my system to Mavericks went off without a hitch… Or so it seemed. I did share in the Gmail issues, but in the end the effect on my work was relatively benign. Thankfully Apple took these things seriously and issued a patch. The biggest problem I ran into was unfortunately bootstrapping my environment for development on my current primary project.

The main problem-causing dependency has been: capybara-webkit. More specifically, its dependency on QT. There have been a number of problems reported around the web about QT on Mavericks. In my case, I tend to use Homebrew to manage such dependencies. Unfortunately, the Homebre formula is broken.

To be honest, I’m not completely sure what all the issues have been, but here’s what I did to get my environment back up to snuff. In all likelihood some of this is unecessary, but I thought it worth capturing:

  • Completely uninstalled Homebrew and all its installed libs
  • Completely removed all rubies and gems
  • Installed QT manually from the .pkg installer *key magic*
  • Reinstalled Homebrew
  • Reinstalled rubies (I like ruby-install and chruby these days)
  • bundle installed my project
  • Finally green specs!

Any QT installed by Homebrew, even when the installation was successful was causing Errno::EPIPE errors after a few specs ran. That seems to be due to the “webkit_server binary crash(ing)”.

Hopefully all you fine folks out there have been met with much better success than myself upgrading to Apple’s shiny new OS! Let me know if you have any questions. Maybe I can help you avoid some stress ;)


** UPDATE ** — November 9, 2013

I finally got around to updating the iMac to Mavericks. Armed with the experience of updating my laptop, the pain was greatly decreased.

The update went smoothly. As for my development envrionment, capybara-webkit was broken (as expected), crashing with Errno::EPIPE exceptions after 100ish specs run.

I was able to fix this using these decidedly less drastic steps:

  1. brew update (always be updatin’ brew, why not?)
  2. brew uninstall qt. Homebrew’s QT hasn’t worked with 10.9. I don’t trust it.
  3. Installed QT manually from the .pkg installer
  4. gem uninstall capybara-webkit. I believe the installation of this gem binds, links, or some such magic to QT. This was for good measure. Maybe not needed?
  5. bundle. Installed my dependencies again, installing capybara-webkit

After this my spec suite runs all green! Sweet spec-passing justice ;)