Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

How To Build A Mac OS X App With XCode and MacRuby

By Peter Cooper / March 15, 2010

Want to develop a Mac OS X app without getting waist deep in Objective C? MacRuby is the answer, and it’s now mature enough to use directly from XCode to build fully-featured Ruby-powered Mac apps. “Jean Pierre Hernandez” of Phusion presents a walkthrough of how to do it, step by step.

The tutorial walks through:

  • Creating a new project in XCode
  • Designing an interface with Interface Builder
  • Customizing form widgets
  • Writing a controller in MacRuby
  • Connecting the controller to the window

Any knowledge of XCode, Objective C, and Interface Builder will enable you to get through this walkthough a lot quicker, but it’s not essential.

Installing MacRuby and XCode

While it’s possible to install MacRuby by compiling yourself, it takes forever, so Jean Pierre recommends grabbing the latest stable binary release and going from there. It’s quick to install and doesn’t require any messing around at the command line. Also, if you haven’t yet installed XCode from your OS X discs, now’s the time – you’ll need XCode to get anywhere with this walkthrough. You can also download them from Apple.

Aside: Phusion Gets A New Homepage

As an aside, Phusion recently launched their all new official Web site. The grungey look and graffiti logo are gone, and have been replaced by shiny, modern 2010 gloss. They’re focusing on providing Ruby and Rails performance and underlying infrastructure services to companies who demand serious power from Ruby. Check it out.

Other Posts to Enjoy

Twitter Mentions