[MacRuby-devel] hotcocoa - can't find executable...how to find it

Robert Schaaf rwschaaf at comcast.net
Fri Jan 30 04:46:10 PST 2009


Thanks Tim, this is helpful, but the problem is that once hotcocoa.rb  
is found, is fails on line 1, framework 'cocoa', thus:

> RuntimeError: framework at path `cocoa' cannot be loaded: Error  
> Domain=NSCocoaErrorDomain Code=4 UserInfo=0x136c620 "The bundle  
> “cocoa” could not be loaded because its executable could not be  
> located."
> 	from /Library/Frameworks/MacRuby.framework/Versions/0.3/usr/lib/ 
> ruby/1.9.0/hotcocoa.rb:1:in `framework'
>

Is this because the cocoa framework can't be found, or that it might  
be corrupted, or what?

Here are the paths that your suggestion returns, with added newlines  
for clarity (and a several non-working gems!)

["/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/lib/ruby/gems/ 
1.9.0/gems/rb-appscript-0.5.1/lib",
  "/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/lib/ruby/ 
gems/1.9.0/gems/yahoofinance-1.2.2/lib",
  "/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/lib/ruby/ 
site_ruby/1.9.0",
  "/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/lib/ruby/ 
site_ruby/1.9.0/universal-darwin9.0",
  "/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/lib/ruby/ 
site_ruby",
  "/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/lib/ruby/ 
vendor_ruby/1.9.0",
  "/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/lib/ruby/ 
vendor_ruby/1.9.0/universal-darwin9.0",
  "/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/lib/ruby/ 
vendor_ruby",
  "/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/lib/ruby/ 
1.9.0",
  "/Library/Frameworks/MacRuby.framework/Versions/0.3/usr/lib/ruby/ 
1.9.0/universal-darwin9.0",
  "."]

Could it have been a macgem install gone bad that clobbered  
something?  What does a normal macruby installation look like?

Continued thanks,

Bob Schaaf

Tim Rand wrote:

>>> $:.each{|path| puts path + "/" + "hotcocoa.rb" if File.exists? 
>>> (path + "/"
> + "hotcocoa.rb")}
> /Library/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/ 
> 1.9.0/hotcocoa.rb
>
> $: is a ruby environmental variable for an array of all the paths  
> that ruby
> looks at to require a file.
> Another useful one to know is $", which holds the names of all  
> currently
> loaded external files.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20090130/68c1da88/attachment.html>


More information about the MacRuby-devel mailing list