'fox16'
library couldn't be require
d. Grumble.Fortunately, this post on the fxruby-users mailing list (again, courtesy of Lyle Johnson, lead programmer of FXRuby and author of the PragBook) was able to get me going:
a workaround is to use the "gem env" command to identify your Gems installation directory (usually something like /usr/local/lib/ruby/gems/1.8) and switch to the "gems/fxruby-[version]/ext/fox16" directory underneath that:Note: Since RubyGems comes installed with Leopard, your gem installation directory is more likely to be something like "/Library/Ruby/Gems/1.8", at least if you did a fresh install as I did. YMMV.cd /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.6.0/ext/fox16and then type:make
But here I encountered the same architecture problem I referenced in my previous post. This time I ended up editing the
Makefile
and deleting all references to "-arch ppc
"; setting the ARCHFLAGS
environment variable before running make
didn't cut it for me.Once you've re-made the gem, you should be able to verify your installation in
irb
:>> require 'fox16'Two final caveats:
=> true
- I had to modify the PragExample with the line "
require 'rubygems'
" at the top of the file, right before the "require 'fox16'
" line. This was because I haven't yet set myRUBYOPT
environment variable in Leopard to require rubygems automatically for me. - The example program worked fine for me after all this (try holding the shift button to do multiple selections), until I quit, at which point I got:
X Fatal Error.
Abort trap
2 comments:
David, thanks for blogging about your experiences in trying to get this working on Leopard. I personally have been holding off on upgrading to Leopard until SuperDuper! (my backup tool of choice) is working there, so I haven't had much opportunity to investigate the issues on Leopard yet. As always, please post questions to the fxruby-users list, or the bug tracker, if you run into trouble!
Thanks, Lyle. It was your post about defining LDFLAGS that pointed the way. I'm looking forward to the book, now that I've got the infrastructure in place. :-)
Post a Comment