# \[BUG\]Bus Error

**URL:** <https://www.ruby-forum.com/t/bug-bus-error/89437>\
**Category:** Ruby\
**Created:** [March 20, 2007, 1:21pm UTC](https://www.ruby-forum.com/t/bug-bus-error/89437 "2007-03-20T13:21:35Z")\
**Posts on this page:** 5\
**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:** [March 20, 2007, 1:21pm UTC](https://www.ruby-forum.com/t/bug-bus-error/89437/1 "2007-03-20T13:21:35Z")

</div>

i’m using ruby with libxml and libxslt to transfom an xhtml file into an  
xbel one thru xslt.

It seems (not deeply verified) the transform itself works but i get the  
following error message :

$ ./fir2xbel.rb  
./fir2xbel.rb:23: [BUG] Bus Error  
ruby 1.8.5 (2006-08-25) [powerpc-darwin8.8.0]

the whole script could be resumed to :

#! /usr/bin/env ruby -wx

require ‘xml/libxml’  
require ‘xml/libxslt’

xslt=XML::XSLT.file()  
xslt.doc=XML::Document.file()  
s=xslt.parse  
s.apply  
f=File.open(,‘w’)  
f.puts s

notice the -wx arg to Ruby.

where could i search for such an error ?

---

<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:** [March 20, 2007, 4:10pm UTC](https://www.ruby-forum.com/t/bug-bus-error/89437/2 "2007-03-20T16:10:49Z")

</div>

Maybe a dumb question but do you have a PPC Mac? I had a bunch of  
similar errors when I migrated my entire system (including Ruby  
install) from my PPC Powerbook Pro to an Intel MacBook Pro. The  
resolution was a complete reinstall of Ruby.

Peter

On Mar 20, 2007, at 8:20 AM, Une Bévue wrote:

> ruby 1.8.5 (2006-08-25) [powerpc-darwin8.8.0]  
> s=xslt.parse  
> s.apply  
> f=File.open(,‘w’)  
> f.puts s
> 
> notice the -wx arg to Ruby.
> 
> where could i search for such an error ?

Peter B.  
removed\_email\_address@domain.invalid  
917 445 5663

---

<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:** [March 20, 2007, 6:06pm UTC](https://www.ruby-forum.com/t/bug-bus-error/89437/3 "2007-03-20T18:06:01Z")

</div>

Peter B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Maybe a dumb question but do you have a PPC Mac? I had a bunch of  
> similar errors when I migrated my entire system (including Ruby  
> install) from my PPC Powerbook Pro to an Intel MacBook Pro. The  
> resolution was a complete reinstall of Ruby.

Yes i do have a PPC Mac the ruby i’m using was installed on this PPC Mac  
using MacPorts.

Such a bug is new to me, might be linked to Mac OS X 10.4.9 updat ?

Also it seems this has nothing to do with the xsl file by itself because  
i get this error with the simplest one.

I’m sure i didn’t have this error on 10.4.8…

---

<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:** [March 20, 2007, 10:20pm UTC](https://www.ruby-forum.com/t/bug-bus-error/89437/4 "2007-03-20T22:20:58Z")

</div>

I’ve had a long-running series of errors (Ruby 1.8.4, 1.8.5p12) of  
this type on a PPC Mac from a scratch install. The problems appeared  
to go away when I blew away /usr/local/lib/ruby and reinstalled Ruby  
(1.8.6) from scratch.

-faisal  
-your rubber chicken may vary

---

<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:** [March 21, 2007, 6:58am UTC](https://www.ruby-forum.com/t/bug-bus-error/89437/5 "2007-03-21T06:58:30Z")

</div>

Faisal N Jawdat [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve had a long-running series of errors (Ruby 1.8.4, 1.8.5p12) of  
> this type on a PPC Mac from a scratch install. The problems appeared  
> to go away when I blew away /usr/local/lib/ruby and reinstalled Ruby  
> (1.8.6) from scratch.

ok, fine thanks !
