FXRuby help

Having some troubles getting FXRuby to work for me. Any script that I run that uses fxruby (including the examples in the FXRuby distribution) will hang on the "require 'fox'" line.

Has anyone seen this before? I'm at a loss. :frowning:

Relevant system information:

> uname -a
Linux serling 2.6.8-gentoo-r3 #1 Tue Sep 21 21:47:54 MDT 2004 i686 Intel(R) Pentium(R) M processor 1600MHz GenuineIntel GNU/Linux

> ruby -v
ruby 1.8.2 (2004-07-29) [i686-linux]

> gcc --version
gcc (GCC) 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)

I've tried both FOX 1.2.4 and 1.2.6. I'm using FXRuby 1.2.1.

On a somewhat-related note: I can't seem to install FXRuby via the gem, either -- it croaks with an error:

聽聽聽make install
聽聽聽make: Nothing to be done for `install'.
聽聽聽ERROR: While executing gem ... (TypeError)
聽聽聽聽聽聽聽cannot convert String into Array

Help!

- Jamis

路路路

--
Jamis Buck
jgb3@email.byu.edu
http://www.jamisbuck.org/jamis

Jamis Buck wrote:

Having some troubles getting FXRuby to work for me. Any script that I run that uses fxruby (including the examples in the FXRuby distribution) will hang on the "require 'fox'" line.

I thought all the examples used:

require 'rubygems'
require_gem 'fxruby'

Has anyone seen this before? I'm at a loss. :frowning:

I've tried both FOX 1.2.4 and 1.2.6. I'm using FXRuby 1.2.1.

On a somewhat-related note: I can't seem to install FXRuby via the gem, either -- it croaks with an error:

  make install
  make: Nothing to be done for `install'.
  ERROR: While executing gem ... (TypeError)
      cannot convert String into Array

This is the error i got when i tried installing via gem. So i built and installed from the tarball (FOX 1.2) and that worked fine for me. Except
the require 'rubygems' method (which i just replace with require 'fox' to get it to work) gives me the following error.

路路路

Could not find RubyGem fxruby (> 0.0.0)

> from /usr/local/lib/site_ruby/1.8/rubygems.rb:34:in `require_gem'
> from dilbert.rb:4

Having some troubles getting FXRuby to work for me. Any script that I
run that uses fxruby (including the examples in the FXRuby distribution)
will hang on the "require 'fox'" line.

Has anyone seen this before? I'm at a loss. :frowning:

Me too. I don't have access to a Gentoo system, but things work fine
under my olden Red Hat 9 install. And I suspect I would have heard
from some other Linux users if this were a widespread problem.

Can you even load FXRuby from irb, e.g. start irb and then do "require 'fox'"?

On a somewhat-related note: I can't seem to install FXRuby via the gem,
either -- it croaks with an error:

There may have been some changes with the latest RubyGems release that
break backwards-compatibility? Again, haven't seen this problem with
RubyGems 0.7 and earlier.

路路路

On Thu, 30 Sep 2004 07:00:45 +0900, Jamis Buck <jgb3@email.byu.edu> wrote:

craig duncan wrote:

Jamis Buck wrote:

Having some troubles getting FXRuby to work for me. Any script that I run that uses fxruby (including the examples in the FXRuby distribution) will hang on the "require 'fox'" line.

I thought all the examples used: require 'rubygems'
require_gem 'fxruby'

They do. I changed it to just 'require "fox"' (since the gem install would not work for me).

(Incidentally, the examples would do well to just say 'require "fox"', instead of the explicit rubygems dependency...)

- Jamis

路路路

--
Jamis Buck
jgb3@email.byu.edu
http://www.jamisbuck.org/jamis

Lyle Johnson wrote:

Having some troubles getting FXRuby to work for me. Any script that I
run that uses fxruby (including the examples in the FXRuby distribution)
will hang on the "require 'fox'" line.

Has anyone seen this before? I'm at a loss. :frowning:

Me too. I don't have access to a Gentoo system, but things work fine
under my olden Red Hat 9 install. And I suspect I would have heard
from some other Linux users if this were a widespread problem.

It has worked for me in the past, under a different gentoo installation...I can only imagine I've got something weird going on, dependency-wise. :frowning:

Can you even load FXRuby from irb, e.g. start irb and then do "require 'fox'"?

Nope. I do 'require "fox"' and it immediately hangs.

Unfortunately, with RubyConf looming, I don't have any more time to spend on this, and not being a "gui-guy", I probably won't spend much time on it after the conference either. If anyone is able to duplicate the problem and find a solution, I'd be very interested in hearing about it, though.

- Jamis

路路路

On Thu, 30 Sep 2004 07:00:45 +0900, Jamis Buck <jgb3@email.byu.edu> wrote:

--
Jamis Buck
jgb3@email.byu.edu
http://www.jamisbuck.org/jamis

Lyle Johnson said:

There may have been some changes with the latest RubyGems release that
break backwards-compatibility? Again, haven't seen this problem with
RubyGems 0.7 and earlier.

The is a change in Gem format between 0.7.0 and 0.8.0, but the 0.8.0 code
is able to handle 0.7.0 formatted gems. If it does not, then that's a
bug.

路路路

--
-- Jim Weirich jim@weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

I'm about to install FXRuby on Suse for the first time, but I seem to
remember that you don't need to install Fox. I remember Lyle saying
that FXRuby came with Fox. Maybe that was just for Windows though.

If you can wait until the weekend, I should have had a chance to get
my FXRuby working by then...

-Rich

路路路

On Thu, 30 Sep 2004 07:38:51 +0900, Jamis Buck <jgb3@email.byu.edu> wrote:

craig duncan wrote:
> Jamis Buck wrote:
>
>> Having some troubles getting FXRuby to work for me. Any script that I
>> run that uses fxruby (including the examples in the FXRuby
>> distribution) will hang on the "require 'fox'" line.
>
>
> I thought all the examples used:
> require 'rubygems'
> require_gem 'fxruby'

They do. I changed it to just 'require "fox"' (since the gem install
would not work for me).

(Incidentally, the examples would do well to just say 'require "fox"',
instead of the explicit rubygems dependency...)

- Jamis

--
Jamis Buck
jgb3@email.byu.edu
http://www.jamisbuck.org/jamis

Yes, that's being fixed for the next release. I didn't understand what
RubyGems' stub libraries were at the time I wrote the examples that
way,

路路路

On Thu, 30 Sep 2004 07:38:51 +0900, Jamis Buck <jgb3@email.byu.edu> wrote:

(Incidentally, the examples would do well to just say 'require "fox"',
instead of the explicit rubygems dependency...)

Me too :wink:

路路路

On Fri, 1 Oct 2004 00:55:45 +0900, Jamis Buck <jgb3@email.byu.edu> wrote:

If anyone is able to duplicate
the problem and find a solution, I'd be very interested in hearing about
it, though.

Remind me at the conference and we'll take a look at it.

Seeya there!
Chad

路路路

On Fri, 1 Oct 2004 00:55:45 +0900, Jamis Buck <jgb3@email.byu.edu> wrote:

Lyle Johnson wrote:
> On Thu, 30 Sep 2004 07:00:45 +0900, Jamis Buck <jgb3@email.byu.edu> wrote:
>
>
>>Having some troubles getting FXRuby to work for me. Any script that I
>>run that uses fxruby (including the examples in the FXRuby distribution)
>>will hang on the "require 'fox'" line.
>>
>>Has anyone seen this before? I'm at a loss. :frowning:
>
>
> Me too. I don't have access to a Gentoo system, but things work fine
> under my olden Red Hat 9 install. And I suspect I would have heard
> from some other Linux users if this were a widespread problem.

It has worked for me in the past, under a different gentoo
installation...I can only imagine I've got something weird going on,
dependency-wise. :frowning:

>
> Can you even load FXRuby from irb, e.g. start irb and then do "require 'fox'"?

Nope. I do 'require "fox"' and it immediately hangs.

Unfortunately, with RubyConf looming, I don't have any more time to
spend on this, and not being a "gui-guy", I probably won't spend much
time on it after the conference either. If anyone is able to duplicate
the problem and find a solution, I'd be very interested in hearing about
it, though.

I've found where I was mislead. It _is_ the windows binary. It comes
with Fox, Scintilla, and OpenGL pre-built.

-Rich

路路路

On Wed, 29 Sep 2004 17:18:22 -0600, Richard Lyman <lymans@gmail.com> wrote:

I'm about to install FXRuby on Suse for the first time, but I seem to
remember that you don't need to install Fox. I remember Lyle saying
that FXRuby came with Fox. Maybe that was just for Windows though.

If you can wait until the weekend, I should have had a chance to get
my FXRuby working by then...

-Rich

On Thu, 30 Sep 2004 07:38:51 +0900, Jamis Buck <jgb3@email.byu.edu> wrote:
> craig duncan wrote:
> > Jamis Buck wrote:
> >
> >> Having some troubles getting FXRuby to work for me. Any script that I
> >> run that uses fxruby (including the examples in the FXRuby
> >> distribution) will hang on the "require 'fox'" line.
> >
> >
> > I thought all the examples used:
> > require 'rubygems'
> > require_gem 'fxruby'
>
> They do. I changed it to just 'require "fox"' (since the gem install
> would not work for me).
>
> (Incidentally, the examples would do well to just say 'require "fox"',
> instead of the explicit rubygems dependency...)
>
>
>
> - Jamis
>
> --
> Jamis Buck
> jgb3@email.byu.edu
> http://www.jamisbuck.org/jamis
>
>

The precompiled binary distribution of FXRuby for Windows has the FOX
library statically linked into it, so that you don't need to install
FOX separately. This is not the case for Linux; you need to download
and install FOX first.

路路路

On Thu, 30 Sep 2004 08:18:29 +0900, Richard Lyman <lymans@gmail.com> wrote:

I'm about to install FXRuby on Suse for the first time, but I seem to
remember that you don't need to install Fox. I remember Lyle saying
that FXRuby came with Fox. Maybe that was just for Windows though.

RubyGems doesn't use stubs anymore; it redefines Kernel#require to
search the "gem dirs" at require time. I believe it's a good idea not
to add require 'rubygems' to the examples anyway: the user can
set RUBYOPT as needed.

路路路

On Thu, Sep 30, 2004 at 10:24:59PM +0900, Lyle Johnson wrote:

On Thu, 30 Sep 2004 07:38:51 +0900, Jamis Buck <jgb3@email.byu.edu> wrote:

> (Incidentally, the examples would do well to just say 'require "fox"',
> instead of the explicit rubygems dependency...)

Yes, that's being fixed for the next release. I didn't understand what
RubyGems' stub libraries were at the time I wrote the examples that
way,

--
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

I disagree. Setting RUBYOPT is a PITA, as well as being fragile. I'd put
this in the example:

  require 'rubygems' # If appropriate.
  require 'fox'

People need to appreciate that if they install something as a gem, they
need to require 'rubygems' in order to use it. The example above is a
clear way of reinforcing that. People can then decide to use RUBYOPT, or
some other strategy, as they wish.

Cheers,
Gavin

路路路

On Thu, Sep 30, 2004 at 10:24:59PM +0900, Lyle Johnson wrote:

On Thu, 30 Sep 2004 07:38:51 +0900, Jamis Buck <jgb3@email.byu.edu> >> wrote:

> (Incidentally, the examples would do well to just say 'require
"fox"', instead of the explicit rubygems dependency...)

Yes, that's being fixed for the next release. I didn't understand what
RubyGems' stub libraries were at the time I wrote the examples that
way,

RubyGems doesn't use stubs anymore; it redefines Kernel#require to
search the "gem dirs" at require time. I believe it's a good idea not to
add require 'rubygems' to the examples anyway: the user can
set RUBYOPT as needed.