Thanks for all the help Laurent. Here are the results:
Also, could you confirm that it also fails for other frameworks?
macruby -e "framework 'Foundation'"
If this works, then I suspect MacRuby finds a Cocoa.framework somewhere in your disk that is not the right one.
In case you pass a string (ex. foo) to #framework, it will search for foo.framework in the following locations (in this order):
~/Library/Frameworks
/Library/Frameworks
/System/Library/Frameworks
Can you double-check in the 2 first directories that there is nothing wrong there?
Laurent
On Aug 29, 2009, at 8:11 PM, Laurent Sansonetti wrote:
Hi Alistair,
So, looking at the error you pasted earlier, it seems that it's raised in the following objc.m logic:
if (![bundle loadAndReturnError:&error]) {
rb_raise(rb_eRuntimeError,
"framework at path `%s' cannot be loaded: %s",
cstr,
[[error description] UTF8String]);
}
In other words, -[NSBundle loadAndReturnError:] doesn't seem to work. This looks like a problem in Foundation.
Could you try the following snippets?
$ macruby -e "p NSBundle.bundleWithPath('/System/Library/Frameworks/Cocoa.framework').loadAndReturnError(nil)"
$ macruby -e "p NSBundle.bundleWithPath('/System/Library/Frameworks/Cocoa.framework').load"
In my environment both print "1".
Laurent
On Aug 29, 2009, at 2:14 PM, Alistair Holt wrote:
Does anyone have any ideas on this? It's driving me mad not being able to use MacRuby on my MBP. I really don't want to have to try doing something like a clean system install.
BTW - I installed MacRuby the same way on my MP and have had no problems with it at all.
Alistair
2009/8/29 Alistair Holt <alistairholt@gmail.com>
I've just upgraded to Snow Leopard and installed again from trunk but I'm still having the same issue with not being able to load the Cocoa framework in macirb. :(
Alistair
2009/8/26 Alistair Holt <alistairholt@gmail.com>
Perhaps I'll give installing another go. I did install 0.4 and went onto install from trunk afterwards but neither worked at the time. I'll let you know what happens.
Alistair
2009/8/26 Matt Aimonetti <mattaimonetti@gmail.com>
I had the same problem occuring a few days ago, after reinstalling macruby trunk today, everything is back to normal.
- Matt
On Mon, Aug 24, 2009 at 2:38 AM, Alistair Holt <alistairholt@gmail.com> wrote:
Hi Laurent,
Thanks for the reply. I ran it and got:
~ $ macruby -e "framework '/System/Library/Frameworks/Cocoa.framework'; p :ok"
:ok
My filesystem is definitely not case sensitive.
Alistair Holt
2009/8/24 Laurent Sansonetti <lsansonetti@apple.com>
Hi Alistair,
This is very strange... could you try the following command?
$ macruby -e "framework '/System/Library/Frameworks/Cocoa.framework'; p :ok"
Also, maybe your filesystem is case sensitive? The default format is case insensitive, in theory.
Laurent
On Aug 23, 2009, at 8:42 AM, Alistair Holt wrote:
Hello,
I've just installed MacRuby (MacRuby version 0.4 (ruby 1.9.1) [universal-darwin9.5, x86_64]) via the package I downloaded from http://www.macruby.org and I dropped straight into macirb to start on the tutorial (http://www.macruby.org/documentation/tutorial.html). I ran framwork 'Cocoa' and uh oh.. a RuntimeError popped up.
I've seen another thread on this list from January with the same issue but there wasn't really any fix detailed. I've posted my console output of lots of different commands at https://gist.github.com/359195517cc2364b82b8.
I'm running 10.5.8 on a MacBook Pro 2.4Ghz Intel Core 2 Duo. Hard disk format is Mac OS Extended (Journaled).
Hopefully someone can help me out.
Thanks
Alistair Holt
E: alistairholt@gmail.com
W: koopd.com / http://www.linkedin.com/in/alistairholt
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel