Beginning to use FxRuby - help, please

I’ve just installed FxRuby

When I type
> require ‘fox’

Instead of ‘true’, I get the message:
LoadError: No such file to load – fox

···

I’ve installed the PragProg Windows version of Ruby 1.6.8, which has
set up the following filepaths:

REM Ruby Install -- do not edit this line
set TCL_LIBRARY=D:\Programs\Coding\Ruby\tcl\lib\tcl8.3
set RUBY_TCL_DLL=D:\Programs\Coding\Ruby\tcl\bin\tcl83.dll
set RUBY_TK_DLL=D:\Programs\Coding\Ruby\tcl\bin\tk83.dll
set path=%path%;D:\Programs\Coding\Ruby\bin
REM Ruby Install -- do not edit this line

The fox stuff has been installed to:
D:\Programs\Coding\Ruby\lib\ruby\site_ruby\1.6\fox
D:\Programs\Coding\Ruby\samples\FXRuby
D:\Programs\Coding\Ruby\doc\FXRuby

So far, I have read:
D:/Programs/Coding/Ruby/doc/FXRuby/doc/build.html
D:/Programs/Coding/Ruby/doc/FXRuby/doc/todo.html
D:\Programs\Coding\Ruby\doc\FXRuby\README.win32.txt

Cheers,
Euan
Gawnsoft: http://www.gawnsoft.co.sr
Symbian/Epoc wiki: http://html.dnsalias.net:1122
Smalltalk links (harvested from comp.lang.smalltalk) http://html.dnsalias.net/gawnsoft/smalltalk

Gawnsoft wrote:

I’ve just installed FxRuby

When I type
> require ‘fox’

Instead of ‘true’, I get the message:
LoadError: No such file to load – fox


I’ve installed the PragProg Windows version of Ruby 1.6.8, which has
set up the following filepaths:

REM Ruby Install -- do not edit this line
set TCL_LIBRARY=D:\Programs\Coding\Ruby\tcl\lib\tcl8.3
set RUBY_TCL_DLL=D:\Programs\Coding\Ruby\tcl\bin\tcl83.dll
set RUBY_TK_DLL=D:\Programs\Coding\Ruby\tcl\bin\tk83.dll
set path=%path%;D:\Programs\Coding\Ruby\bin
REM Ruby Install -- do not edit this line

The fox stuff has been installed to:
D:\Programs\Coding\Ruby\lib\ruby\site_ruby\1.6\fox
D:\Programs\Coding\Ruby\samples\FXRuby
D:\Programs\Coding\Ruby\doc\FXRuby

OK, so for some reason Ruby is not seeing the “fox.so” shared library,
which on your system should have been installed to:

 D:\Programs\Coding\Ruby\lib\ruby\site_ruby\1.6\i586-mswin32

Is that file present? If it is, what do you get when you print the
contents of Ruby’s library path from irb:

 > $:

Thanks,

Lyle

wrote (more or less):

Gawnsoft wrote:

I’ve just installed FxRuby

When I type
> require ‘fox’

Instead of ‘true’, I get the message:
LoadError: No such file to load – fox


I’ve installed the PragProg Windows version of Ruby 1.6.8, which has
set up the following filepaths:

REM Ruby Install -- do not edit this line
set TCL_LIBRARY=D:\Programs\Coding\Ruby\tcl\lib\tcl8.3
set RUBY_TCL_DLL=D:\Programs\Coding\Ruby\tcl\bin\tcl83.dll
set RUBY_TK_DLL=D:\Programs\Coding\Ruby\tcl\bin\tk83.dll
set path=%path%;D:\Programs\Coding\Ruby\bin
REM Ruby Install -- do not edit this line

The fox stuff has been installed to:
D:\Programs\Coding\Ruby\lib\ruby\site_ruby\1.6\fox
D:\Programs\Coding\Ruby\samples\FXRuby
D:\Programs\Coding\Ruby\doc\FXRuby

OK, so for some reason Ruby is not seeing the “fox.so” shared library,
which on your system should have been installed to:

D:\Programs\Coding\Ruby\lib\ruby\site_ruby\1.6\i586-mswin32

Is that file present?

Yes, in the directory you cited.

If it is, what do you get when you print the
contents of Ruby’s library path from irb:

> $:

[“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby/1.6/i386-cygwin”,
“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby/1.6”,
“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby”,
“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/1.6/i386-cygwin”,
“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/1.6”, “.”]

Thanks for your help…

Cheers,
Euan
Gawnsoft: http://www.gawnsoft.co.sr
Symbian/Epoc wiki: http://html.dnsalias.net:1122
Smalltalk links (harvested from comp.lang.smalltalk) http://html.dnsalias.net/gawnsoft/smalltalk

···

On Sat, 30 Aug 2003 11:57:32 -0500, Lyle Johnson lyle@knology.net

Gawnsoft wrote:

If it is, what do you get when you print the
contents of Ruby’s library path from irb:

$:

[“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby/1.6/i386-cygwin”,
“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby/1.6”,
“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby”,
“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/1.6/i386-cygwin”,
“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/1.6”, “.”]

Thanks for your help…

OK. You apparently have a an older, Cygwin-based installation of Ruby
that is taking precedence over the Pragmatic Programmer’s Ruby installer
(which is based on Visual C++). This is obvious from the paths listed in
Ruby’s “$:” library path; it’s showing “i386-cygwin” as the platform
instead of “i586-mswin32”.

I’m not sure how you got into this situation, or what is the best way to
fix it. If there is no entry in the “Add/Remove Programs” list for
Windows, you may need to manually uninstall Ruby (i.e. delete the
D:\Programs\Coding\Ruby directory completely) and then re-install using
the Pragmatic Programmers’ installer.

wrote (more or less):

Gawnsoft wrote:

If it is, what do you get when you print the
contents of Ruby’s library path from irb:

$:

[“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby/1.6/i386-cygwin”,
“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby/1.6”,
“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby”,
“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/1.6/i386-cygwin”,
“/cygdrive/d/PROGRAMS/CODING/RUBY/lib/ruby/1.6”, “.”]

Thanks for your help…

OK. You apparently have a an older, Cygwin-based installation of Ruby
that is taking precedence over the Pragmatic Programmer’s Ruby installer
(which is based on Visual C++). This is obvious from the paths listed in
Ruby’s “$:” library path; it’s showing “i386-cygwin” as the platform
instead of “i586-mswin32”.

I’m not sure how you got into this situation, or what is the best way to
fix it. If there is no entry in the “Add/Remove Programs” list for
Windows, you may need to manually uninstall Ruby (i.e. delete the
D:\Programs\Coding\Ruby directory completely) and then re-install using
the Pragmatic Programmers’ installer.

Yes - it’s (one of the) last of the Cygwin versions of the PragProg
installers that I’ve been using. (1.6.4-2).

Time to move up to MSVC technology at a guess, then!

Perhaps a warning of oldest usable versions of the Windows
installation could be placed in the readme.txt and the installation
notes files.

I’d write the update, but I’m not quite sure what the exact
restriction is…

Thanks again Lyle - I’ll clear out the old install and get a new one
and try again.

Cheers,
Euan
Gawnsoft: http://www.gawnsoft.co.sr
Symbian/Epoc wiki: http://html.dnsalias.net:1122
Smalltalk links (harvested from comp.lang.smalltalk) http://html.dnsalias.net/gawnsoft/smalltalk

···

On Sat, 30 Aug 2003 14:34:38 -0500, Lyle Johnson lyle@knology.net

On Sat, 30 Aug 2003 14:34:38 -0500, Lyle Johnson wrote (more or less):

re-install using the Pragmatic Programmers’ installer.

Okay - cleared off the old version of FxRuby, and the 1.6.4-2 install.

Installed Ruby 1.6.8-8 (which includes FxRuby)

the installation acknowledges fox when I require it now, but…

When I run the tutorial ‘Hello.rb’ from FreeRide:

 require 'fox' 
 include Fox 
 theApp = FXApp.new 
 theMainWindow = FXMainWindow.new(theApp, "Hello")
 theApp.create 
 theMainWindow.show 
 theApp.run

I get a task bar entry labelled ‘Hello’, but no window.

p.s. $: now returns:

[“D:/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby/1.6”,
“D:/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby/1.6/i586-mswin32”,
“D:/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby”,
“D:/PROGRAMS/CODING/RUBY/lib/ruby/1.6”,
“D:/PROGRAMS/CODING/RUBY/lib/ruby/1.6/i586-mswin32”, “.”]

Cheers,
Euan
Gawnsoft: http://www.gawnsoft.co.sr
Symbian/Epoc wiki: http://html.dnsalias.net:1122
Smalltalk links (harvested from comp.lang.smalltalk) http://html.dnsalias.net/gawnsoft/smalltalk

On Sun, 31 Aug 2003 04:03:54 +0100, Gawnsoft wrote (more or less):

On Sat, 30 Aug 2003 14:34:38 -0500, Lyle Johnson wrote (more or less):

OK. You apparently have a an older, Cygwin-based installation of Ruby
that is taking precedence over the Pragmatic Programmer’s Ruby installer
(which is based on Visual C++). This is obvious from the paths listed in
Ruby’s “$:” library path; it’s showing “i386-cygwin” as the platform
instead of “i586-mswin32”.

I’m not sure how you got into this situation, or what is the best way to
fix it. If there is no entry in the “Add/Remove Programs” list for
Windows, you may need to manually uninstall Ruby (i.e. delete the
D:\Programs\Coding\Ruby directory completely) and then re-install using
the Pragmatic Programmers’ installer.

Yes - it’s (one of the) last of the Cygwin versions of the PragProg
installers that I’ve been using. (1.6.4-2).

Time to move up to MSVC technology at a guess, then!

Perhaps a warning of oldest usable versions of the Windows
installation could be placed in the readme.txt and the installation
notes files.

I’d write the update, but I’m not quite sure what the exact
restriction is…

Thanks again Lyle - I’ll clear out the old install and get a new one
and try again.

Of course - now that I realise that I’m on 1.6.4, I now also realise
the FxRuby downloads I got were labelled for 1.6.8 at time of
download…

Still - it would be good for this info to be in the readme/install
notes too…

Cheers,
Euan
Gawnsoft: http://www.gawnsoft.co.sr
Symbian/Epoc wiki: http://html.dnsalias.net:1122
Smalltalk links (harvested from comp.lang.smalltalk) http://html.dnsalias.net/gawnsoft/smalltalk

Gawnsoft wrote:

On Sat, 30 Aug 2003 14:34:38 -0500, Lyle Johnson wrote (more or less):

re-install using the Pragmatic Programmers’ installer.

Okay - cleared off the old version of FxRuby, and the 1.6.4-2 install.

Installed Ruby 1.6.8-8 (which includes FxRuby)

the installation acknowledges fox when I require it now, but…

When I run the tutorial ‘Hello.rb’ from FreeRide:

require 'fox' 
include Fox 
theApp = FXApp.new 
theMainWindow = FXMainWindow.new(theApp, "Hello")
theApp.create 
theMainWindow.show 
theApp.run

I get a task bar entry labelled ‘Hello’, but no window.

p.s. $: now returns:

[“D:/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby/1.6”,
“D:/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby/1.6/i586-mswin32”,
“D:/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby”,
“D:/PROGRAMS/CODING/RUBY/lib/ruby/1.6”,
“D:/PROGRAMS/CODING/RUBY/lib/ruby/1.6/i586-mswin32”, “.”]

Cheers,
Euan
Gawnsoft: http://www.gawnsoft.co.sr
Symbian/Epoc wiki: http://html.dnsalias.net:1122
Smalltalk links (harvested from comp.lang.smalltalk) http://html.dnsalias.net/gawnsoft/smalltalk

And that’s what you should get :wink: actually look to the upper left of
your screen there should be the window but it’ll be small resize it
or… add a button or something IN the window , i.e. try the next
examples in the tutorial like:

require ‘fox’
include Fox
theApp = FXApp.new
theMainWindow = FXMainWindow.new(theApp, “Hello”)
FXButton.new(theMainWindow, “Hello, World! lots more text to make sure
it shows”)
theApp.create
theMainWindow.show
theApp.run

and that’s it, now you should see the window with a long button with text.

On Mon, 1 Sep 2003 12:37:50 +0900, Osuka Adartse
rocioestradacastaneda@prodigy.net.mx wrote (more or less):

Gawnsoft wrote:

On Sat, 30 Aug 2003 14:34:38 -0500, Lyle Johnson wrote (more or less):

re-install using the Pragmatic Programmers’ installer.

Okay - cleared off the old version of FxRuby, and the 1.6.4-2 install.

Installed Ruby 1.6.8-8 (which includes FxRuby)

the installation acknowledges fox when I require it now, but…

When I run the tutorial ‘Hello.rb’ from FreeRide:

require 'fox' 
include Fox 
theApp = FXApp.new 
theMainWindow = FXMainWindow.new(theApp, "Hello")
theApp.create 
theMainWindow.show 
theApp.run

I get a task bar entry labelled ‘Hello’, but no window.

p.s. $: now returns:

[“D:/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby/1.6”,
“D:/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby/1.6/i586-mswin32”,
“D:/PROGRAMS/CODING/RUBY/lib/ruby/site_ruby”,
“D:/PROGRAMS/CODING/RUBY/lib/ruby/1.6”,
“D:/PROGRAMS/CODING/RUBY/lib/ruby/1.6/i586-mswin32”, “.”]

Cheers,
Euan
Gawnsoft: http://www.gawnsoft.co.sr
Symbian/Epoc wiki: http://html.dnsalias.net:1122
Smalltalk links (harvested from comp.lang.smalltalk) http://html.dnsalias.net/gawnsoft/smalltalk

And that’s what you should get :wink: actually look to the upper left of
your screen there should be the window but it’ll be small

Yep - that was my problem. I was expecting a window sized by the
window title, not one 4 pixels wide.

Now that I’ve mastered ‘hello world’ buttons, I’d better get my mind
round the FOX paradigms.

Cheers,
Euan
Gawnsoft: http://www.gawnsoft.co.sr
Symbian/Epoc wiki: http://html.dnsalias.net:1122
Smalltalk links (harvested from comp.lang.smalltalk) http://html.dnsalias.net/gawnsoft/smalltalk

Gawnsoft wrote:

Now that I’ve mastered ‘hello world’ buttons, I’d better get my mind
round the FOX paradigms.

Some good “community” resources are the FOX and FXRuby users’ mailing
lists. Information about each of these are linked from the FOX and
FXRuby home pages, respectively.

Good documentation resources include the FXRuby User’s Guide and API
documentation (found at the FXRuby home page); the FOX documentation
(found at the FOX home page); and the FOX Community Wiki Site (linked-to
from both the FXRuby and FOX home pages).