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.
D8cb8c8cd40ddf0cd05241443a591868?d=identicon&s=25 Duane Johnson (Guest)
on 2006-01-07 22: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 Johnson
(canadaduane)
http://blog.inquirylabs.com/
Eea7ad39737b0dbf3de38874e0a6c7d8?d=identicon&s=25 Justin Forder (Guest)
on 2006-01-07 23:35
(Received via mailing list)
Duane Johnson 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 Johnson
> (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
073622ce04686a9e7a2a2ef3c3a66fe9?d=identicon&s=25 will bailey (Guest)
on 2006-04-22 16:08
(Received via mailing list)
I have the same problem.  Did you find the solution to this?
Ae03102311939454d2b7f1ca3139fd97?d=identicon&s=25 Lindsay Boyd (Guest)
on 2006-04-22 16:33
Duane Johnson 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
807e34b31d5463a9ac05d41458a9e537?d=identicon&s=25 Al Evans (al-evans)
on 2006-04-22 16:34
Duane Johnson 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
Ae03102311939454d2b7f1ca3139fd97?d=identicon&s=25 Lindsay Boyd (Guest)
on 2006-04-22 17:31
Al Evans wrote:
> Duane Johnson 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
807e34b31d5463a9ac05d41458a9e537?d=identicon&s=25 Al Evans (al-evans)
on 2006-04-22 19:58
Lindsay Boyd 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
5f684d0857aad571acf1aa1e1fb3e544?d=identicon&s=25 Takashi Okamoto (Guest)
on 2006-04-22 20: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.
59de94a56fd2c198f33d9515d1c05961?d=identicon&s=25 Tom Mornini (Guest)
on 2006-04-22 21:55
(Received via mailing list)
Ae03102311939454d2b7f1ca3139fd97?d=identicon&s=25 Lindsay Boyd (Guest)
on 2006-04-22 23:19
Tom Mornini wrote:
> http://threebit.net/mail-archive/rails/msg01024.html
>
> --
> -- Tom Mornini

Excellent instructions... my console now works!

thanks
Lindsay
59de94a56fd2c198f33d9515d1c05961?d=identicon&s=25 Tom Mornini (Guest)
on 2006-04-23 02:04
(Received via mailing list)
Cool!

Glad I was able to help. :-)

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