RMagick bus error on OS X in console mode

This is a strange bug that I’ve never seen before. It only shows up
when I run the app through the console (the app is Family Connection,
and it works fine when run as a web app):

22$ ruby script/console
Loading development environment.

User
/opt/local/lib/ruby/vendor_ruby/1.8/powerpc-darwin8.3.0/
RMagick.bundle: [BUG] Bus Error
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.3.0]

Abort trap

I am then unceremoniously dumped back to the shell prompt. Anyone
have a clue as to what’s going on here?

Duane J.
(canadaduane)
http://blog.inquirylabs.com/

Duane J. wrote:

Abort trap

I am then unceremoniously dumped back to the shell prompt. Anyone have
a clue as to what’s going on here?

Duane J.
(canadaduane)
http://blog.inquirylabs.com/

Are you absolutely sure you are not using the Apple Ruby when running
from the console? I’ve read that it was compiled with the wrong
endianness setting.

regards

Justin

Duane J. wrote:
Anyone

have a clue as to what’s going on here?

I have the same problem:

./script/console
Loading development environment.
/usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.4.0/RMagick.bundle:
[BUG] Bus Error
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]

Abort trap
My-G4-Powerbook:~/Sites/app user$ rails -v
Rails 1.1.2
My-G4-Powerbook:~/Sites/app user$ ruby -v
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]

I think it started happening after the 1.1 upgrade, but I can’t be sure.
I’ve searched high and wide, but found no info on this.

-Lindsay

I have the same problem. Did you find the solution to this?

Duane J. wrote:

I am then unceremoniously dumped back to the shell prompt. Anyone
have a clue as to what’s going on here?

try script/console, then
ENV[“PATH”]

if it doesn’t start with “/opt/local/bin…”, then you need to edit
your .profile or .bash_profile to add the /opt/local stuff to the front
(so you’ll get your DarwinPorts installs by preference to whatever came
on the system). Something like this:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

–Al Evans

Al Evans wrote:

Duane J. wrote:
you need to edit
your .profile or .bash_profile to add the /opt/local stuff to the front
(so you’ll get your DarwinPorts installs by preference to whatever came
on the system). Something like this:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

–Al Evans

Al, my .profile already contained:

Your previous .profile (if any) is saved as .profile.dpsaved

Setting the path for DarwinPorts.

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

Presumably added when I installed Fink? Anyway, I tried exporting the
PATH at the command line:

$export PATH=/opt/local/bin:/opt/local/sbin:$PATH
$./script/console
Loading development environment.
/usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.4.0/RMagick.bundle:
[BUG] Bus Error
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]

Abort trap
$echo $PATH
/opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/bin:/sbin:/usr/bin:/usr/sbin:/Users/lindsay/scripts:.:/usr/X11R6/bin

-Lindsay

Lindsay B. wrote:

Your previous .profile (if any) is saved as .profile.dpsaved

Setting the path for DarwinPorts.

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

Presumably added when I installed Fink? Anyway, I tried exporting the
PATH at the command line:

$export PATH=/opt/local/bin:/opt/local/sbin:$PATH
$./script/console
Loading development environment.
/usr/local/lib/ruby/site_ruby/1.8/powerpc-darwin8.4.0/RMagick.bundle:
[BUG] Bus Error
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]

Abort trap
$echo $PATH
/opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/bin:/sbin:/usr/bin:/usr/sbin:/Users/lindsay/scripts:.:/usr/X11R6/bin

Hmmm – in my installation, RMagick is in /opt/local/lib. It took me a
while to get everything lined up right, though. My guess would be that
it built against the wrong version of ruby. There’s a good set of build
instructions here:

http://rmagick.rubyforge.org/install-osx.html

Maybe something in them will give you an “aha”…

–Al Evans

http://threebit.net/mail-archive/rails/msg01024.html


– Tom M.

Tom M. wrote:

http://threebit.net/mail-archive/rails/msg01024.html


– Tom M.

Excellent instructions… my console now works!

thanks
Lindsay

i had the same exact bus error. at first i thought it was my RMagick
installation, which i compiled long before i got into rails (inside /
usr/local/lib). so i reinstalled with the gem version, but the bus
error still exists. i don’t really have a solution, but i wanted to
tell you i experience the same problem.

-tak.

Cool!

Glad I was able to help. :slight_smile:


– Tom M.