Ruby

I’m using this tut from Hivelogic <http://hivelogic.com/articles/ruby-rails-leopard/

to compile and install Ruby at /usr/local. It goes as expected
until I try to install RubyGems at which point the Terminal outputs
this:

sudo: unable to execute /usr/local/bin/gem: Bad CPU type in executable

I haven’t been able to find a definitive answer or fix, anyone have an
idea?

Todd


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

First suggestion - use MacPort instead of building it yourself.

Second suggestion - consider posting your question in the comments section at hivelogic.com?

Third suggestion, and this is a bit out of context since I can’t see your entire log that lead up to the failure: In some cases you have to replace ‘sudo’ with 'sudo env ARCHFLAGS=“-arch i386” ’ (without the single quotes but with the double quotes) for some things to work. But your problem may be more fundamental, since you can’t even get gem to run at all. Maybe you should revisit how you built it. You might set ARCHFLAGS as above in your environment before you start building gem or even ruby.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I rebuilt it and everything now works as expected. I’ve looked at
MacPort and Fink and may use one at some point down the road but for
now I prefer to roll my own. I learn more plus I enjoy the experience.

Todd

On Jan 13, 2010, at 11:59 AM, Chuck Price wrote:

First suggestion - use MacPort instead of building it yourself.

Second suggestion - consider posting your question in the comments
section at hivelogic.com?

Third suggestion, and this is a bit out of context since I can’t see
your entire log that lead up to the failure: In some cases you have
to replace ‘sudo’ with 'sudo env ARCHFLAGS=“-arch i386” ’ (without
the single quotes but with the double quotes) for some things to
work. But your problem may be more fundamental, since you can’t even
get gem to run at all. Maybe you should revisit how you built it.
You might set ARCHFLAGS as above in your environment before you
start building gem or even ruby.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options