Sunday, 3 May 2015

Installing gtk3 Ruby Gem on OS X Yosemite

As I found installing the gtk3 Ruby Gem on OS X Yosemite is a little fiddly, I thought I'd make a note of how to do it for next time so that I don't need to spend time searching the internet to found out how.

First, you need to install X-windows. That's pretty straightforward simply click on the X.11 icon in the Others collection in LaunchPad and follow the instructions.

Second, you need to install gtk+3 itself. Using HomeBrew that's straightforward:

    brew install gtk+3

Then the tricky bit. You need to help gem find the correct libffi library. I found  out how to do it thanks to the Ruby-Gnome team:

   sudo PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig gem install gtk3