Problem installing FxRuby

R

Richard Lionheart

Hi All,

I'm running Ruby 1.8.2-15 over WinXP-Pro/SP2. I tried to install Ruby on
Rails by executing:
-- gem update
-- gem install rails
but I got an error from "gem update" relating to its inability to find FX
headers, or something like that.

Following is a list of the my attempts to get around this problem followed
with a couple of questions of how I should proceed. Any suggestions or
comments would be gratefully received.

*** My attempts to get around this problem ***

So I decided to install FxRuby by downloading it into my
K:\_Utilities\Ruby_1.8.2-15\FxRuby directory from
http://rubyforge.org/frs/download.php/5675/FXRuby-1.4.2-ruby182.exe. That
seemed to go fine.

Then I tried to run the simple example from FxRuby's documentation and ran
into a problem with the first line: require 'fox14' with the messages:

k:/_utilities/ruby_1.8.2-15/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__': No such file to load --
fox14 (LoadError)
from
k:/_utilities/ruby_1.8.2-15/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require'
from FxTest1.rbw:1

Hunting for "Fox14" revealed four of them in various places in my
Ruby_1.8.2-15 directory:
-- K:\_Utilities\Ruby_1.8.2-15\FxRuby\lib\ruby\site_ruby\1.8\fox14\

--
K:\_Utilities\Ruby_1.8.2-15\FxRuby\lib\ruby\site_ruby\1.8\i386-msvcrt\fox14.so

-- K:\_Utilities\Ruby_1.8.2-15\lib\ruby\gems\1.8\gems\fxruby-1.4.2\ext\fox14

-- K:\_Utilities\Ruby_1.8.2-15\lib\ruby\gems\1.8\gems\fxruby-1.4.2\lib\fox14



*** My current idea about how to the problem ***



I think I should delete the latter two directories. Do you agree?



Additionally, I should arrange for "require" to search the
"...\i386-msvcrt" directory so that it can utilize the "fox14.so" file. How
can I do that? Perhaps including it in the PATH environment variable? Or
some Ruby-specific environment variable?
 
L

Lyle Johnson

I'm running Ruby 1.8.2-15 over WinXP-Pro/SP2. I tried to install Ruby on
Rails by executing:
-- gem update
-- gem install rails
but I got an error from "gem update" relating to its inability to find FX
headers, or something like that.

OK, so if I understand this part correctly, you were trying to first
update your already-installed gems by doing a "gem update" and, in the
process, it tried to update FXRuby?

Let's pretend you answered "yes" to that last question. What I don't
understand is why RubyGems is (apparently) trying to build FXRuby from
the source gem (fxruby-1.4.2.gem), instead of just installing the
binary gem for Windows (fxruby-1.4.2-mswin32). That strikes me as a
possible bug in RubyGems' "update" command.
Following is a list of the my attempts to get around this problem followe= d
with a couple of questions of how I should proceed. Any suggestions or
comments would be gratefully received.

*** My attempts to get around this problem ***

So I decided to install FxRuby by downloading it into my
K:\_Utilities\Ruby_1.8.2-15\FxRuby directory from
http://rubyforge.org/frs/download.php/5675/FXRuby-1.4.2-ruby182.exe. Tha= t
seemed to go fine.
OK.

Then I tried to run the simple example from FxRuby's documentation and ra= n
into a problem with the first line: require 'fox14' with the messages:

k:/_utilities/ruby_1.8.2-15/lib/ruby/site_ruby/1.8/rubygems/custom_requir= e.rb:18:in
`require__': No such file to load --
fox14 (LoadError)
from
k:/_utilities/ruby_1.8.2-15/lib/ruby/site_ruby/1.8/rubygems/custom_requir= e.rb:18:in
`require'
from FxTest1.rbw:1

Hunting for "Fox14" revealed four of them in various places in my
Ruby_1.8.2-15 directory:
-- K:\_Utilities\Ruby_1.8.2-15\FxRuby\lib\ruby\site_ruby\1.8\fox14\

--
K:\_Utilities\Ruby_1.8.2-15\FxRuby\lib\ruby\site_ruby\1.8\i386-msvcrt\fox= 14.so

-- K:\_Utilities\Ruby_1.8.2-15\lib\ruby\gems\1.8\gems\fxruby-1.4.2\ext\fo= x14

-- K:\_Utilities\Ruby_1.8.2-15\lib\ruby\gems\1.8\gems\fxruby-1.4.2\lib\fo=
x14

OK, I see the problem. When the installer program
(FXRuby-1.4.2-ruby182.exe) asked you for the Ruby installation
directory, you must have input "K:\_Utilities\Ruby_1.8.2-15\FxRuby".
The correct answer would have been "K:\_Utilities\Ruby_1.8.2-15". This
is why Ruby couldn't find your installation of FXRuby (it was
installed outside of Ruby's standard search path).
*** My current idea about how to the problem ***

I think I should delete the latter two directories. Do you agree?

Yes. I would first uninstall the FXRuby that you installed in the
wrong location (i.e. by using Windows' "Add/Remove Program" feature).
As for the borked gems, I would use the "gem uninstall" command to
remove all of the existing FXRuby gems that may be installed on your
system.
Additionally, I should arrange for "require" to search the
"...\i386-msvcrt" directory so that it can utilize the "fox14.so" file. H= ow
can I do that? Perhaps including it in the PATH environment variable? O= r
some Ruby-specific environment variable?

You should not need to do this if you provide the correct Ruby
installation directory to the installer.

Hope this helps,

Lyle
 
R

Richard Lionheart

Hi Lyle,

Thanks a lot for weighing in on my plight. It's great to hear from a
bonafide expert. Your advice was excellent. I apologize for imposing on
this newsgroup with another question that arose, I believe, from my overly
zealous "uninstalling".

Following your guidance, detailed in gory detail as an appendix, the
uninstalls and reinstall of FxRuby and Rails went smoothly. However,
testing the installation failed probably because on my mistake. If my
proposed solution below is sound, I'd just like an OK.

** The test **
In the Command window, I changed the directory to:
K:\_Utilities\Ruby_1.8.2-15\lib\ruby\gems\1.8\gems\fxruby-1.4.2\examples

Ran command: ruby bounce.rb

** The result **
Got error message:
k:/_utilities/ruby_1.8.2-15/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:
in `require__': No such file to load -- fox14 (LoadError)

** The cause?? **
As I mentioned below, after the two uninstalls you recommended, there
remained two (sprurious, I thought) fox14 directories, one in lib and one
in ext as I recall. Sadly, I didn't save them in Recycle bin, so I can't
recover them..

** The solution?? **
gem uninstall rails

gem uninstall fxruby
Control Panel | Add/Remove Pgms: Ruby
Reinstall Ruby
gem update
gem install rails
Hope this helps

It certainly did!! I apologize from (apparently) screwing it up.

Best wishes,
Richard Muller


******** Installation details ***************
... first uninstall the FxRuby by using Windows' "Add/Remove Program"
Uninstalled cleanly ... even removed the subdirectory I had incorrectly
created!
... use the "gem uninstall" command
Another clean uninstall!

Additionally, I manually deleted the other two fx14 directories. ERROR, I
think: see problem below

However, I left the existing
"K:\_Utilities\Ruby_1.8.2-15\lib\ruby\gems\1.8\gems\fxruby-1.4.2" folder
with its populated subdirectories, doc,examples,ext,lib,... intact.

"gem update" and "gem install rails" (with all its dependencies) went
smoothly.

I wound up putting a short cut in K:\_Utilities\Ruby_1.8.2-15 to
FxRuby-1.4.2's location:
K:\_Utilities\Ruby_1.8.2-15\lib\ruby\gems\1.8\gems\fxruby-1.4.2 (Sorry:
Ughh)
 
L

Lyle Johnson

Following your guidance, detailed in gory detail as an appendix, the
uninstalls and reinstall of FxRuby and Rails went smoothly. However,
testing the installation failed probably because on my mistake. If my
proposed solution below is sound, I'd just like an OK.

** The test **
In the Command window, I changed the directory to:
K:\_Utilities\Ruby_1.8.2-15\lib\ruby\gems\1.8\gems\fxruby-1.4.2\examples

Ran command: ruby bounce.rb

** The result **
Got error message:
k:/_utilities/ruby_1.8.2-15/lib/ruby/site_ruby/1.8/rubygems/custom_requir= e.rb:18:
in `require__': No such file to load -- fox14 (LoadError)

** The cause?? **
As I mentioned below, after the two uninstalls you recommended, there
remained two (sprurious, I thought) fox14 directories, one in lib and on= e
in ext as I recall. Sadly, I didn't save them in Recycle bin, so I can'= t
recover them..

** The solution?? **
gem uninstall rails

gem uninstall fxruby
Control Panel | Add/Remove Pgms: Ruby
Reinstall Ruby
gem update
gem install rails

I *think* this should do the trick. Basically, after you do a "gem
uninstall fxruby", you shouldn't find *any* fxruby-related stuff under
the ...\Ruby_1.8.2-15\lib\ruby\gems\1.8 directory. Or at least that's
my understanding of how RubyGems' uninstall process works.

You should definitely get rid of any "spurious" fox14 directories
under the ...\lib\ruby\gems\1.8 directory, and then maybe as a sanity
check do a "gem list --local" to ensure that RubyGems doesn't think
FXRuby's installed (as a gem) anymore.
It certainly did!! I apologize from (apparently) screwing it up.

I think some of the confusion comes from the duplication between
RubyGems and other installation methods. In other words, if you
install FXRuby using the executable installer
(fxruby-1.4.2-ruby182.exe or whatever), then gems doesn't know
anything about it. If (when) gems is better integrated into Ruby, I
hope that this will become less an issue.
 
R

Richard Lionheart

Hi Lyle,

Still got a problem. I cleaned up my system with:
-- gem uninstall rails
-- gem uninstall fxruby
-- Control Panel | Add/Remove Pgms: Ruby [K:\_Utilities\Ruby_1.8.2-15 is
now empty]
-- Reinstallation of Ruby into K:\_Utilities\Ruby_1.8.2-15\ruby [Note: one
extra level than before]

Then I ran "gem update" with option "1, fxruby 1.4.2 (ruby)". Update ran
for a few minutes and then failed with:
======== Command window output from 'gem update' ============
extconf.rb:30:in `find_installed_fox_version': couldn't find FOX header
files (RuntimeError)
from extconf.rb:155
ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in
K:/_Utilities/Ruby_1.8.2-15/ruby/lib/ruby/gems/1.8/gems/fxruby-1.4.2 for
inspection.
ruby extconf.rb update\n
Results logged to
K:/_Utilities/Ruby_1.8.2-15/ruby/lib/ruby/gems/1.8/gems/fxruby-1.4.2/ext/fox14/gem_make.out
===================================================

When I encountered this failure last time, I tried to install FxRuby using
FXRuby-1.4.2-ruby182.exe.

Can line 1 in the above output be referring to the *.h files stored in the
"include" subdirectory of the "gem_make.out" file cited in the last line of
the above output? That file is a zip file containing a slew of *.cpp files
plus a subdirectory of *.h files.

I also found a number of directories which had "fox" in their names or in
the name of subdirectories or files (all subordinate to
K:/_Utilities/Ruby_1.8.2-15/ruby/lib/ruby):
========== "FOX related subdirectories ===========
freeride\plugins\rubyide_fox_gui
lib\ruby\1.8\test\unit\ui\fox
lib\ruby\gems\1.8\doc\fxri-0.3.2\rdoc\classes
lib\ruby\gems\1.8\doc\fxri-0.3.2\rdoc\classes\Packet_Item
lib\ruby\gems\1.8\doc\fxri-0.3.2\rdoc\files\lib
lib\ruby\gems\1.8\gems\fxri-0.3.2\lib\FoxDisplayer.rb
lib\ruby\gems\1.8\gems\fxruby-1.2.6-mswin32\examples\icons
lib\ruby\gems\1.8\gems\fxruby-1.2.6-mswin32\ext\fox12
lib\ruby\gems\1.8\gems\fxruby-1.2.6-mswin32\ext\fox12\fox12.so [A file]
lib\ruby\gems\1.8\gems\fxruby-1.2.6-mswin32\lib\fox12
lib\ruby\gems\1.8\gems\fxruby-1.4.2\examples\icons
lib\ruby\gems\1.8\gems\fxruby-1.4.2\ext\fox14
lib\ruby\gems\1.8\gems\fxruby-1.4.2\lib\fox14
========================================

Maybe the problem was with my choice of option 1. Here's a list of the
options:
============ Optional "gems" ================
1. fxruby 1.4.2 (ruby)
2. fxruby 1.4.2 (mswin32)
3. fxruby 1.4.1 (mswin32)
4. fxruby 1.4.1 (ruby)
5. fxruby 1.4.0 (ruby)
6. fxruby 1.2.6 (ruby)
7. fxruby 1.2.6 (mswin32)
8. fxruby 1.2.5 (mswin32)
9. fxruby 1.2.5 (ruby)
10. fxruby 1.2.4 (ruby)
11. fxruby 1.2.4 (mswin32)
12. fxruby 1.2.3 (mswin32)
13. fxruby 1.2.3 (ruby)
14. fxruby 1.2.2 (mswin32)
15. fxruby 1.2.2 (ruby)
16. fxruby 1.2.1 (mswin32)
17. fxruby 1.2.1 (ruby)
18. Cancel installation
=======================================

Maybe I should forget about "gem update" and instead install FxRuby from
FXRuby-1.4.2-ruby182.exe. But if so, where should Fox be installed within
the Ruby hierarchy?

I hope I didn't overwhelm you with details in this message, but I'd really
like to try Ruby on Rails over FxRuby.

Regards,
Richard
 
C

Curt Hibbs

I didn't really read this thread, but one thing below caught my eye.
Running "gem uninstall rails" WILL NOT clean up your Rails
installation. This is because the gem named "rails" is a meta-package
that merely causes about 6 other gems to be installed because of
dependencies.

When you "gem uninstall rails" this only uninstalls the meta-package,
but all of the other parts of rails (like ActiveRecord, ActionPack,
etc.) are still there. Instead, run "gem list" to see what is
installed, and uninstall each component separately with its own "gem
uninstall".

Curt

Hi Lyle,

Still got a problem. I cleaned up my system with:
-- gem uninstall rails
-- gem uninstall fxruby
-- Control Panel | Add/Remove Pgms: Ruby [K:\_Utilities\Ruby_1.8.2-15 is
now empty]
-- Reinstallation of Ruby into K:\_Utilities\Ruby_1.8.2-15\ruby [Note: on= e
extra level than before]

Then I ran "gem update" with option "1, fxruby 1.4.2 (ruby)". Update ran
for a few minutes and then failed with:
=3D=3D=3D=3D=3D=3D=3D=3D Command window output from 'gem update' =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
extconf.rb:30:in `find_installed_fox_version': couldn't find FOX header
files (RuntimeError)
from extconf.rb:155
ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in
K:/_Utilities/Ruby_1.8.2-15/ruby/lib/ruby/gems/1.8/gems/fxruby-1.4.2 = for
inspection.
ruby extconf.rb update\n
Results logged to
K:/_Utilities/Ruby_1.8.2-15/ruby/lib/ruby/gems/1.8/gems/fxruby-1.4.2/e= xt/fox14/gem_make.out
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D

When I encountered this failure last time, I tried to install FxRuby usi= ng
FXRuby-1.4.2-ruby182.exe.

Can line 1 in the above output be referring to the *.h files stored in th= e
"include" subdirectory of the "gem_make.out" file cited in the last line = of
the above output? That file is a zip file containing a slew of *.cpp fil= es
plus a subdirectory of *.h files.

I also found a number of directories which had "fox" in their names or in
the name of subdirectories or files (all subordinate to
K:/_Utilities/Ruby_1.8.2-15/ruby/lib/ruby):
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D "FOX related subdirectories =3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D
freeride\plugins\rubyide_fox_gui
lib\ruby\1.8\test\unit\ui\fox
lib\ruby\gems\1.8\doc\fxri-0.3.2\rdoc\classes
lib\ruby\gems\1.8\doc\fxri-0.3.2\rdoc\classes\Packet_Item
lib\ruby\gems\1.8\doc\fxri-0.3.2\rdoc\files\lib
lib\ruby\gems\1.8\gems\fxri-0.3.2\lib\FoxDisplayer.rb
lib\ruby\gems\1.8\gems\fxruby-1.2.6-mswin32\examples\icons
lib\ruby\gems\1.8\gems\fxruby-1.2.6-mswin32\ext\fox12
lib\ruby\gems\1.8\gems\fxruby-1.2.6-mswin32\ext\fox12\fox12.so [A file]
lib\ruby\gems\1.8\gems\fxruby-1.2.6-mswin32\lib\fox12
lib\ruby\gems\1.8\gems\fxruby-1.4.2\examples\icons
lib\ruby\gems\1.8\gems\fxruby-1.4.2\ext\fox14
lib\ruby\gems\1.8\gems\fxruby-1.4.2\lib\fox14
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Maybe the problem was with my choice of option 1. Here's a list of the
options:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Optional "gems" =3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
1. fxruby 1.4.2 (ruby)
2. fxruby 1.4.2 (mswin32)
3. fxruby 1.4.1 (mswin32)
4. fxruby 1.4.1 (ruby)
5. fxruby 1.4.0 (ruby)
6. fxruby 1.2.6 (ruby)
7. fxruby 1.2.6 (mswin32)
8. fxruby 1.2.5 (mswin32)
9. fxruby 1.2.5 (ruby)
10. fxruby 1.2.4 (ruby)
11. fxruby 1.2.4 (mswin32)
12. fxruby 1.2.3 (mswin32)
13. fxruby 1.2.3 (ruby)
14. fxruby 1.2.2 (mswin32)
15. fxruby 1.2.2 (ruby)
16. fxruby 1.2.1 (mswin32)
17. fxruby 1.2.1 (ruby)
18. Cancel installation
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Maybe I should forget about "gem update" and instead install FxRuby from
FXRuby-1.4.2-ruby182.exe. But if so, where should Fox be installed with= in
the Ruby hierarchy?

I hope I didn't overwhelm you with details in this message, but I'd real= ly
like to try Ruby on Rails over FxRuby.

Regards,
Richard
 
L

Lyle Johnson

Still got a problem. I cleaned up my system with:
-- gem uninstall rails
-- gem uninstall fxruby
-- Control Panel | Add/Remove Pgms: Ruby [K:\_Utilities\Ruby_1.8.2-15 is
now empty]
-- Reinstallation of Ruby into K:\_Utilities\Ruby_1.8.2-15\ruby [Note: on= e
extra level than before]

So far, so good.
Then I ran "gem update" with option "1, fxruby 1.4.2 (ruby)".

Yeah, that was your mistake. You need to pick the option that says
fxruby 1.4.2 (mswin32). It is most likely your second option. That
will install a precompiled version of FXRuby for Windows with little
or no muss or fuss. The option that you're choosing (the "fxruby 1.4.2
(ruby)") tries to build FXRuby from source code, which is painful in
the best of cases.
 
R

Richard Lionheart

Hi Curt,

Thanks for taking a look at my problem.
Running "gem uninstall rails" WILL NOT clean up
your Rails

I did notice the automatic installation of about a half-dozen other packages
when I installed Rails, so I recognize your analysis is right on point.

But in this case, the uninstalls were only pro-forma in my mind because I
uninstalled Ruby in its entirety through Windows/Add-Remove-Programs
followed by a check that the Ruby directory was in fact empty.

The key issue for me is the fact that having made a clean install of Ruby,
gem-update failed midway.

As I was typing this, Lyle's response popped up in my News client. He
wrote that I chose the wrong option to gem-update. I chose option "1,
fxruby 1.4.2 (ruby)". I should have chosen option 2 which, as Lyle says,
" ... will install a precompiled version of FXRuby for Windows with little
or no muss or fuss. The option that you're choosing (the "fxruby 1.4.2
(ruby)") tries to build FXRuby from source code, which is painful in the
best of cases.

So my trail may soon be over. Again, thanks for responding on this thread.

Regards,
Richard
 
R

Richard Lionheart

Hi Lyle,
You need to pick the option that says
fxruby 1.4.2 (mswin32).

Success!!

Now that I look more carefully, that choice was sort of suggested on the
line immediately preceding the menu: "Select which gem to install for your
platform (i386-mswin32)".

I didn't choose that option because I recalled reading somewhere that
mswin32 involved getting installing CygWin, etc. Clearly now that was a
mistaken notion.

I apologize for taking so much of your time. I'm truly grateful for your
help.

Best wishes,
Richard
 
P

Pit Capitain

Lyle said:
Yeah, that was your mistake. You need to pick the option that says
fxruby 1.4.2 (mswin32). It is most likely your second option. That
will install a precompiled version of FXRuby for Windows with little
or no muss or fuss. The option that you're choosing (the "fxruby 1.4.2
(ruby)") tries to build FXRuby from source code, which is painful in
the best of cases.

Who is responsible for those names? Could they be changed to something
which is easier to understand, maybe

fxruby 1.4.2 (mswin32 binaries)
fxruby 1.4.2 (sources)

Not sure about the second one. I remember that I once had chosen the
wrong option, too, because their meaning wasn't clear to me.

Regards,
Pit
 
L

Lyle Johnson

Who is responsible for those names? Could they be changed to something
which is easier to understand, maybe

fxruby 1.4.2 (mswin32 binaries)
fxruby 1.4.2 (sources)

Not sure about the second one. I remember that I once had chosen the
wrong option, too, because their meaning wasn't clear to me.

If I recall correctly, they are predefined constants in the RubyGems
library, constants that you use when you're writing the Gem
specification. So no, I didn't get to pick the names, that's a
RubyGems thing. I agree that the meanings of the names aren't as clear
as they could be...
 

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

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,193
Latest member
TopCryptoTaxSoftwares2024

Latest Threads

Top