From: Simon Blanchard Date: 2003-07-04T19:41:57+09:00 Subject: Re: RubyCocoa problem: No such file to load -- osx/objc/cocoa Barry Shultz wrote: > Hi, > Pardon the attachment, but this issue has been brought up before with no > resolution (that I know of), so I have tried to include any possibly > relevant info in the attached file. > I have been unable to get RubyCocoa to work with Ruby 1.8 on OS X (I did > not try to get it running with the pre-installed 1.6.7, because of > problems with Array#pack that I brought up last week on the ML). > At the end of the attached file, you'll see that RubyCocoa does not > successfully run its unit tests, and I get the error shown in the > subject. I have tried to include all relevant information about my OS > and my install of RubyCocoa. > I would be happy to provide any other information, if someone will help > me solve this one. Hi I figured this out. Below is the email I sent to the contact email for RubyCocoa but I didn't get any reply. Anyway, all you need do is open the Framework project file in ProjectBuilder and clear the linking of libruby-static by deselecting the check box. But this does mean that when you build apps you will need to explicity link in libruby-static. Hope this helps. I've just got RubyCocoa working on the setup below. rubycocoa 0.4.0 src Mac OS 10.2.5 Ruby 1.8.0 preview 2 Latest developer tools The problem was that libruby-static got linked twice: once with ruby and once with the RubyCocoa framework. This meant that each got their own versions of the global variables defined in libruby-static - the problem being the variable rb_load_path - you prepend the Framework path to this in RBRuntime.m but because libruby-static was linked into RubyCocoa framework the newly prepended directory only goes on that copy of rb_load_path - not the rb_load_path used in the ruby interpreter. I fixed this (eventuallY - when I found the reasons) by removing the link of libruby-static in the framework project files. This worked fine - but it means that when applications are built and linked with the framework you also need to link libruby-static (an extra lib on the link line) I hope this is helpful to you. BTW: I also tried RubyAEOSE 0.2.2 src - which crashed - don't know why yet. Regards Simon