FXRuby help

J

Jamis Buck

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. :(

Relevant system information:
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 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
 
C

craig duncan

Jamis said:
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. :(

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.
 
J

Jamis Buck

craig said:
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
 
R

Richard Lyman

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
 
R

Richard Lyman

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

-Rich
 
L

Lyle Johnson

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. :(

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.
 
L

Lyle Johnson

(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,
 
L

Lyle Johnson

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.

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.
 
J

Jamis Buck

Lyle said:
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. :(
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
 
C

Chad Fowler

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. :(


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.

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

Seeya there!
Chad
 
M

Mauricio Fernández

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.
 
J

Jim Weirich

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.
 
G

Gavin Sinclair

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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,282
Latest member
RoseannaBa

Latest Threads

Top