[MacRuby-devel] MacRuby.h not found

Jean-Denis MUYS jdmuys at kleegroup.com
Tue Jun 12 05:23:08 PDT 2012


I am not sure this is really the right thing to do, but copying the MacRuby.framework directory back inside the Xcode.app bundle solved my issue. This even lets me work indifferently with Xcode 4.3.3 and Xcode 45DP1.

I used the ditto command, e.g.:

sudo ditto /Library/Frameworks/MacRuby.framework /Applications/Xcode45-DP1.app/Contents/Developer/Library/Frameworks/MacRuby.framework

Regards,

Jean-Denis


On 12 juin 2012, at 13:27, Jean-Denis Muys wrote:

> Hello,
> 
> After installing, in order:
> 
> - Xcode 4.3.3 (update of 4.3.2)
> - Xcode 4.5DP1
> - MacRuby 0.12 binary distribution
> 
> I create a new MacRuby project (so some MacRuby template is found), but Xcode 4.3.3 fails to compile the main.m file. It chokes on "#import <MacRuby/MacRuby.h>" with the error "MacRuby/MacRuby.h file not found".
> 
> I checked that the MacRuby framework appear in my project and is listed in the "Link Binary With Libraries" build phases.
> 
> However, it appears in red in both places and file inspector says it's located at "Library/Frameworks/MacRuby.framework", "Relative to Developer Directory".
> 
> I'm not sure which is the "Developer Directory" (how can I find out?), but MacRuby.framework sure doesn't appear in my ~/Developer directory. Inspecting the MacRuby installer logs shows that it installed it right in /Library/Frameworks, not in any developer directory. This is confirmed by a search of MacRuby.framework using the mdfind command: MacRuby.framework is only to be found in  /Library/Frameworks.
> 
> xcode-select -print-path reports /Applications/Xcode433.app/Developer, but MacRuby.framework doesn't appear in /Applications/Xcode433.app/Developer/Library/Frameworks.
> 
> I tried to replace the MacRuby.framework from the template by the one that is located in /Library/Frameworks. The project now shows it in black, not red, so it's found now. However, I still have the exact same compiler error.
> 
> Looking at the Xcode target settings, I found that the Framework Search Paths setting points to the Frameworks directory within Xcode433.
> 
> This seems to suggest that the installer installed MacRuby.framework in the wrong location: /Library instead of the currently-selected Xcode directory.
> 
> What would be the next step in my case? Is it enough to copy over MacRuby.framework to /Applications/Xcode433.app/Developer/Library/Frameworks?
> 
> Thanks,
> 
> Jean-Denis
> 
> 
> PS: to be complete:
> 
> Calling "macruby --version" in the terminal reports "MacRuby 0.12 (ruby 1.9.2) [universal-darwin10.0, x86_64]", but if I recall correctly, so did the rather old nightly build I had installed previously.
> 
> Calling "which macruby" reports /usr/local/bin/macruby, which is consistent with the MacRuby installer.
> 
> 



More information about the MacRuby-devel mailing list