[fxruby-users] Install question on Mac

Lyle Johnson lyle at lylejohnson.name
Tue Apr 28 14:53:08 EDT 2009

On Tue, Apr 28, 2009 at 1:09 PM, Pito Salas <rps at salas.com> wrote:

> Thanks... Your diagnosis sounds correct. Indeed I would prefer to use
> everything via mac ports.
> One thing I don't understand though, maybe you can clarify.
> If I use MacPorts to install FxRuby like you say:
> $ sudo port install rb-fxruby
> Am I installing a gem or installing fx ruby in some other place?

Ah, good question. If you install FXRuby via MacPorts, you are indeed
installing it in "some other place", namely, under:


> To keep my sanity I've tried to install with gem everything that's a
> gem, and with ports everything else. That way when I uninstall I know
> where to go and in theory I have one less possible path problem.

Sure, I understand. Well, you can cross your fingers and try
installing via the source gem, then. For some people this works very
smoothly and for others it's sort of a disaster.

    export CPPFLAGS="-I/opt/local/include"
    export ARCHFLAGS="-arch i386 -L/opt/local/lib"
    sudo gem install fxruby --platform ruby

The first two lines set up some environment variables so that the
build from source code knows to look in MacPorts for the FOX (and
related) dependencies (instead of in, say, /usr/local). By passing the
"--platform ruby" command line switch to the "gem install" command,
you're telling RubyGems to pick the source gem instead of the binary
gem (which, per my earlier e-mail, is incompatible with Ruby from

Good luck, and let me know how it goes,


More information about the fxruby-users mailing list