On 5/3/05, Daniel Sperl <redgeREM0VETHIS / incognitek.com> wrote:

> Unfortunately, the "require 'fox12'"-call does not work either.

OK.

> Here is the output of irb:
> irb(main):001:0> require 'rubygems'
> => true
> irb(main):002:0> require 'fox12'
> => false
> irb(main):003:0> include Fox
> NameError: uninitialized constant Fox
>          from (irb):3
> 
> As you can see, 'require' now returns false! Which, unfortunately, does
> not tell me anything about *which* error was encountered.

Right. For that matter, I just did a clean install of FXRuby 1.2.6
from the gem, and I get a "false" response after I require 'fox12',
even though it *successfully* loaded the library! (Which seems to
indicate a RubyGems bug, but I digress).

> The structure of my 'gems'-directory is the following (if that helps):
> 
> /usr/lib/ruby/gems/1.8/gems/fxruby-1.2.5/
>    doc
>    examples
>    ext
>    lib
>      fox12
>    rdoc-sources
>    tests
>    web

This may just have been an oversight on your part, but do you not also
have this directory:

    /usr/lib/ruby/gems/1.8/gems/fxruby-1.2.5/ext/fox12

?

You should have that one, and (more importantly) it should contain a
file named "fox12.so"; that's what Ruby should be trying to load when
you do the require "fox12".

If that file is there -- and I'm guessing that it is -- it's possible
that Ruby can't load "fox12" because it depends on the FOX library
(libFOX-1.2.so) and the FOX library is in some directory that's not in
your path for dynamically-loadable libraries. For some information on
how to fix that, please see the section titled "Things That Can Go
Wrong", near the bottom of this page from the FXRuby User's Guide:

    http://www.fxruby.org/doc/gems.html

I have a strong hunch that this is the source of the problem.

> Is it possible that it has something to do with the huge amount of
> "declared but not used"-warnings I got during installation/compilation?
> (I can send you the logfile of the installation, if that would be helpful.)

It's possible, but that's not my first suspicion. Let's hold off on
your sending me the build log until we eliminate the previously
mentioned possibility...