Beginning to use FxRuby - help, please

G

Gawnsoft

I've just installed FxRuby

When I type
irb> 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
 
G

Gawnsoft

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:

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
 
G

Gawnsoft

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

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
 
G

Gawnsoft

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
 
O

Osuka Adartse

Gawnsoft said:
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 ;-) 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.
 
G

Gawnsoft

Gawnsoft said:
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 ;-) 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
 

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,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top