From: Len Lawrence Date: 2008-01-16T05:05:02+09:00 Subject: fxruby gem problem Dear ruby acolytes ruby 1.8.5 I am floundering here, again. Having more or less decided to switch from rubytk to fxruby I have installed FOX and the fxruby-1.4.7 gem in Mandriva 2007. The simple test program from David Berube's book Practical Ruby Gems does not work. In fact none of the package test examples will run either. They all fall down trying to load fox14. This is my test script: ------------------------------------------------------------------- require 'fox14' include Fox zeg = FXApp.new fen = FXMainWindow.new( zeg, "Test app" ) abutton = FXButton.new( fen, 'Click me!' ) abutton.connect( SEL_COMMAND ) do abutton.text = "I've been clicked!" end zeg.create fen.show( PLACEMENT_SCREEN ) zeg.run ------------------------------------------------------------------- and the error is: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- fox14 (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from zeg.rb:2 The gem search path is: /usr/lib/ruby/gems/1.8/gems/fxruby-1.4.7 and the target is lib/fox14 which certainly exists and contains a number of ruby scripts; aliases.rb, calendar.rb, core.rb, etc. It looks like ruby is trying to load the directory as a file, perhaps as fox14.rb. Does anybody know what causes this behaviour? All the available fxruby scripts seem to imply that fox14 should be acceptable as a target. Is there some kind of configuration that needs to be performed to get ruby to open it as a directory and load all the files? Could there be an error in the gem spec file? Simple gems like blinkenlights and creditcard work as expected but they have single targets like lib/blinkenlights.rb and lib/creditcard.rb. Also, with require_gem instead of require this is the error report: /usr/lib/ruby/site_ruby/1.8/rubygems.rb:251:in `report_activate_error': Could not find RubyGem fox14 (>= 0.0.0) (Gem::LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:188:in `activate' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:66:in `active_gem_with_options' from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:59:in `require_gem' from zeg.rb:2