# Failure in irb with rubycocoa (MAC OS X)

**URL:** <https://www.ruby-forum.com/t/failure-in-irb-with-rubycocoa-mac-os-x/76262>\
**Category:** Ruby\
**Created:** [November 17, 2006, 2:06am UTC](https://www.ruby-forum.com/t/failure-in-irb-with-rubycocoa-mac-os-x/76262 "2006-11-17T02:06:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [November 17, 2006, 2:06am UTC](https://www.ruby-forum.com/t/failure-in-irb-with-rubycocoa-mac-os-x/76262/1 "2006-11-17T02:06:43Z")

</div>

Hi there,

after installing RubyCocoa on Mac OS X i tried the first steps with it  
in irb:

That’s what happened

> > require ‘osx/cocoa’  
> > /usr/lib/ruby/site\_ruby/1.8/powerpc-darwin8.0/rubycocoa.bundle: [BUG]  
> > Bus Error  
> > ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]

Abort trap

Does anybody had the same probs or is it just because my machine is too  
old 😉  
I remember bus errors very well from C++

Whats happening here? Does anybody know the answer and can help me?

Kind regards  
norman

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [November 17, 2006, 2:12am UTC](https://www.ruby-forum.com/t/failure-in-irb-with-rubycocoa-mac-os-x/76262/2 "2006-11-17T02:12:44Z")

</div>

Hi,

On Nov 17, 2006, at 2:05 AM, removed\_email\_address@domain.invalid wrote:

> ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]
> 
> Abort trap

I believe this was a Ruby bug that has been fixed in 1.8.5, so you  
should consider upgrading your Ruby distribution (1.8.2 is a bit old  
anyway).

HTH,  
Laurent

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [November 17, 2006, 12:05pm UTC](https://www.ruby-forum.com/t/failure-in-irb-with-rubycocoa-mac-os-x/76262/3 "2006-11-17T12:05:40Z")

</div>

On 17/nov/06, at 02:05, removed\_email\_address@domain.invalid wrote:

> That’s what happened
> 
> > > require ‘osx/cocoa’  
> > > /usr/lib/ruby/site\_ruby/1.8/powerpc-darwin8.0/rubycocoa.bundle: [BUG]  
> > > Bus Error  
> > > ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]

The first thing you should do is upgrading ruby: 1.8.2 is quite old.  
You can follow the Mac OS X instructions here:

> **[Dan Benjamin](https://danbenjamin.com)**
>
> Dan Benjamin's personal website.

That URL is even referenced by [developer.apple.com](http://developer.apple.com).

Anyway, under Cocoa SIGBUS is usually received when something tries  
to send messages to an object which has already been released.  
The following Objective C code:  
[myObject release];  
[myObject someMessage];  
is likely to produce a Bus Error signal (as long as nothing else  
retains myObject).

So, if upgrading ruby doesn’t actually fix the problem, there could  
be a bug of this kind within rubycocoa.  
(Finally Apple will release Objective C 2.0 with garbage collector  
along with Leopard! :))

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [November 17, 2006, 8:27pm UTC](https://www.ruby-forum.com/t/failure-in-irb-with-rubycocoa-mac-os-x/76262/4 "2006-11-17T20:27:17Z")

</div>

Gabriele M. wrote:

> [Dan Benjamin](http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger)  
> That URL is even referenced by [developer.apple.com](http://developer.apple.com).

I’ve already installed the latest version of ruby in /usr/local/bin but  
“my ruby” with Rubycocoa doesn’t work. So i tried the internal ruby. Or  
should i just overwrite the internal ruby? Is that possible at least ?  
🙂

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [November 17, 2006, 9:29pm UTC](https://www.ruby-forum.com/t/failure-in-irb-with-rubycocoa-mac-os-x/76262/5 "2006-11-17T21:29:24Z")

</div>

On 17/nov/06, at 20:25, jeckyll wrote:

> I’ve already installed the latest version of ruby in /usr/local/bin  
> but  
> “my ruby” with Rubycocoa doesn’t work. So i tried the internal  
> ruby. Or  
> should i just overwrite the internal ruby? Is that possible at least ?  
> 🙂

Did you install the binaries from the .dmg? I don’t know whether it  
looks for ruby in /usr/bin or /usr/local/bin.  
Anyway, it could be a RubyCocoa bug. Are you sure you’re using the  
latest version?  
Try downloading the latest stable version from SVN:

svn co [RubyCocoa download | SourceForge.net](https://svn.sourceforge.net/svnroot/rubycocoa/trunk) rubycocoa

Then you can compile and install it by typing:

ruby install.rb config  
ruby install.rb setup  
sudo ruby install.rb install

within the rubycocoa/src/ directory. Config should use --prefix=/usr/  
local by default.  
If you don’t have svn, look here: [http://metissian.com/projects/](http://metissian.com/projects/)  
macosx/subversion/ (I had the fink version installed, but I think it  
was broken, I wasn’t able to install https support no matter how I  
tried. Maybe they fixed it now, I don’t really know).

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [November 20, 2006, 4:14pm UTC](https://www.ruby-forum.com/t/failure-in-irb-with-rubycocoa-mac-os-x/76262/6 "2006-11-20T16:14:38Z")

</div>

Tom P. wrote:

> modify or add to the builtin ruby. As a general rule, you should  
> leave the Apple-installed unix utilities alone. Just install your  
> own in /usr/local and make sure your PATH is set so that commands you  
> issue use the /usr/local versions preferentially.
> 
> There’s no reason I’m aware of that your own ruby installation (in /  
> usr/local, or elsewhere) shouldn’t work.
> 
> Tom

Hi Tom,

so my ruby-installation works fine in /usr/local/ but it doesn’t work  
with rubycocoa.  
Maybey i should install rubycocoa in /usr/local/ too with prefix  
config?

norm

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [November 20, 2006, 6:25pm UTC](https://www.ruby-forum.com/t/failure-in-irb-with-rubycocoa-mac-os-x/76262/7 "2006-11-20T18:25:24Z")

</div>

On Nov 20, 2006, at 10:14 AM, jeckyll wrote:

> so my ruby-installation works fine in /usr/local/ but it doesn’t work  
> with rubycocoa.  
> Maybey i should install rubycocoa in /usr/local/ too with prefix  
> config?

Yes, that’s how you should install modules that you want to use with  
your /usr/local ruby installation. I’m not familiar with RubyCocoa,  
unfortunately. For most modules, you should just need to go through  
the usual installation procedure, but use /usr/local/bin/ruby instead  
of Apple’s ruby.

Tom

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [November 20, 2006, 2:47pm UTC](https://www.ruby-forum.com/t/failure-in-irb-with-rubycocoa-mac-os-x/76262/8 "2006-11-20T14:47:45Z")

</div>

On Nov 17, 2006, at 2:25 PM, jeckyll wrote:

> I’ve already installed the latest version of ruby in /usr/local/bin  
> but  
> “my ruby” with Rubycocoa doesn’t work. So i tried the internal  
> ruby. Or  
> should i just overwrite the internal ruby? Is that possible at least ?

Of course it’s possible, but it’s likely to be a bad idea. Among  
other reasons or other MacOSX software may expect Apple’s original  
installation to be there and some future Apple OS upgrade may want to  
modify or add to the builtin ruby. As a general rule, you should  
leave the Apple-installed unix utilities alone. Just install your  
own in /usr/local and make sure your PATH is set so that commands you  
issue use the /usr/local versions preferentially.

There’s no reason I’m aware of that your own ruby installation (in /  
usr/local, or elsewhere) shouldn’t work.

Tom
