From: Lyle Johnson Date: 2008-03-28T05:04:10+09:00 Subject: Re: Help installing fxruby on osx On Wed, Mar 26, 2008 at 9:40 PM, Daniel Wilkerson wrote: > So everything should work. Except when I try "require 'fox16'" in a > ruby program, I still get an error. > > ./fxruby1.rb:7:in `require': no such file to load -- fox16 (LoadError) OK, just so I understand it, at this point you've built both FOX and FXScintilla from scratch (not via MacPorts), and then installed FXRuby via RubyGems. And you're using the built-in Ruby that comes with Mac OS 10.5, not a Ruby that you built yourself. The error message suggests, then, that you don't have your RUBYOPT environment variable set so that it automatically loads up RubyGems. For that, see the instructions under "Using RUBYOPT" at this page: http://www.rubygems.org/read/chapter/3 > However there are now fox16 files in my system. > > Macintosh-2:ruby dsw$ find /Library/Ruby -iname "*fox16*" > /Library/Ruby/Gems/1.8/doc/fxruby-1.6.13/rdoc/files/lib/fox16 > /Library/Ruby/Gems/1.8/gems/fxruby-1.6.13/ext/fox16 > /Library/Ruby/Gems/1.8/gems/fxruby-1.6.13/ext/fox16/fox16.bundle > /Library/Ruby/Gems/1.8/gems/fxruby-1.6.13/lib/fox16 > Macintosh-2:ruby dsw$ Right, this looks plausible. > Yet no combinations of adding them to my path seem to work... No, it wouldn't. You need to do this the right way, going through RubyGems' load mechanism. > Now, please note that ports doesn't work either: > > Macintosh-2:ruby dsw$ sudo port install rb-fxruby > Password: > Skipping org.macports.activate (rb-fxruby ) since this port is already > active > ---> Cleaning rb-fxruby > Macintosh-2:ruby dsw$ cat fxruby1.rb && echo && ruby ./fxruby1.rb You're mixing up two different Ruby installations. The "ruby" that's installed in /usr/bin is the one you're running here, and it's the one that came with Mac OS X, so this is just another manifestation of the previous problem. The "ruby" that MacPorts installed along with the "rb-fxruby" port is found in /opt/local/bin, and it has an entirely separate library of gems and what-not. > So I have it installed with fink, gems, and ports and it still doesn't > work. Why do both fink and ports fail so often? They fail more often > than they work. MacPorts worked really well before OS 10.5, and it still works well in general, but the introduction of a built-in ruby alongside the MacPorts ruby has really complicated things. To make matters worse, many (most?) Rubyists will just download the Ruby source code and build their own version, which gets installed in yet another location (usually, /usr/local). It has turned into a real maintenace and support nightmare. > Anyway, I was enthusiastic about using FXRuby but I would be a lot more > enthusiastic if it would actually work. Please let me know how it goes after you get RUBYOPT set for using RubyGems with your built-in Ruby. It sounds like you're closer than you think. Thanks, Lyle