From: Lyle Johnson Date: 2005-11-01T02:19:54+09:00 Subject: Re: Problem installing FxRuby On 10/31/05, Richard Lionheart wrote: > 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 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. OK. > 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 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. How > can I do that? Perhaps including it in the PATH environment variable? Or > 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