Forum: Ruby on Rails RMagick bus error on OS X in console mode

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Duane J. (Guest)
on 2006-01-07 23:31
(Received via mailing list)
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/
Justin F. (Guest)
on 2006-01-08 00:35
(Received via mailing list)
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
will bailey (Guest)
on 2006-04-22 18:08
(Received via mailing list)
I have the same problem.  Did you find the solution to this?
Lindsay B. (Guest)
on 2006-04-22 18:33
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
Al E. (Guest)
on 2006-04-22 18:34
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
Lindsay B. (Guest)
on 2006-04-22 19:31
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
Al E. (Guest)
on 2006-04-22 21:58
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
Takashi Okamoto (Guest)
on 2006-04-22 22:13
(Received via mailing list)
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.
Tom M. (Guest)
on 2006-04-22 23:55
(Received via mailing list)
Lindsay B. (Guest)
on 2006-04-23 01:19
Tom M. wrote:
> http://threebit.net/mail-archive/rails/msg01024.html
>
> --
> -- Tom M.

Excellent instructions... my console now works!

thanks
Lindsay
Tom M. (Guest)
on 2006-04-23 04:04
(Received via mailing list)
Cool!

Glad I was able to help. :-)

--
-- Tom M.
This topic is locked and can not be replied to.