06 Mar 2011, 02:06
Generic-user-small

Braz Ford (2 posts)

I’m trying to do basic stuff from the RubyCocoa book. My code seems to work fine in terminal, but it barfs on the require ‘osx/cocoa’ line in XCode.

HELP!

06 Mar 2011, 02:15
Generic-user-small

Braz Ford (2 posts)

Okay, strangely, I omitted requires, includes, and framework declarations, and now my project seems to be working with:

class Controller < NSObject

I’ll keep going and see if everything is actually connected…

07 Mar 2011, 21:27
Generic-user-small

Gregory Clarke (15 posts)

Hi Braz,

That looks like MacRuby rather than RubyCocoa. For RubyCocoa that line would be:

class Controller < OSX::NSObject

You can have newer versions of MacRuby installed at the same time as RubyCocoa, but older versions interfered with RubyCocoa code. You can check if you’ve got the framework installed, it will be in /Library/Frameworks/MacRuby.framework

  You must be logged in to comment