sudo gem install fxruby
alone didn't get the job done for me. Even using MacPorts to install Fox first (sudo port install fox
) let me down. Here's what (eventually) did work:- Download and Install Fox:
- Download the source. I picked the current stable version from the "Downloads" section, "Linux/Unix" subsection.
- Set the
LDFLAGS
environment variable as described in Lyle Johnson's (author of FXRuby and the book) very helpful post:export LDFLAGS="-dylib_file \
Note: There's a typo in Lyle's instructions that will trip you up if you just cut and paste from there; there should be a space between the "
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"-dylib_file
" and the first "/System/Library/...
". And, in case you're cutting and pasting from here, there should be no space between the colon and the second "/System/Library/...
". cd
to the expanded Fox source folder../configure
, with whatever options you would normally use. I didn't specify anything in particular.sudo make install
, again with your typical options. The vanilla command worked for me.
- Install the FXRuby gem:
sudo env ARCHFLAGS="-arch i386" gem install fxruby
- The extra bits about the
ARCHFLAGS
are a workaround for a problem inld
(and/orlipo
) trying to build this gem for both PPC and Intel architectures. As you might guess, this will work for you only if you're on an Intel Mac. - From the Credit-Where-Credit-Is-Due department: I cribbed the "
env ARCHFLAGS
" trick from the most excellent Hivelogic website, specifically this post.
- Write a cool GUI! (Haven't gotten that far on this item yet...)
Oh, and I'll be looking at Shoes too. No weird Unix/Linux project dependencies for that one, thank goodness. Just a regular .dmg to download and install. Nice.
2 comments:
so how are your GUI adventures in Ruby-land coming? Any success packaging FXRuby apps for cross-platform deployment?
Hi, Jon. Thanks for checking in. Sadly, my "GUI adventures in Ruby-land" are non-existent right now. I've been a very bad Rubyist; too much going on at work (Java-based) right now. Lyle's book is still on my radar, though.
Post a Comment