[fxruby-users] 1.2.2 gem...

Lyle Johnson lyle at knology.net
Mon Nov 22 22:09:10 EST 2004

On Nov 22, 2004, at 12:34 PM, Hal Fulton wrote:

> I installed a new FXScintilla and then did a gem install of fxruby 
> 1.2.2
> again.
> Same thing.

I suspect what is happening is that when you build FXScintilla, it's 
seeing the FOX 1.0 installation (i.e. /usr/local/lib/libFOX.so) and 
linking against that instead of your FOX 1.2 installation (i.e. 
/usr/local/lib/libFOX-1.2.so). Can you send me a copy of the config.log 
file that should be sitting in your FXScintilla build directory? It's 
the file that shows what kinds of decisions the "configure" script 
while it was configuring the FXScintilla build, and it should resolve 
the question of which FOX library your FXScintilla is linked to.

> Apparently the Fox 1.0 is still installed... I expected the 1.2 to 
> overwrite
> it... but "require 'fox'" still works fine for me and gives me old 
> values
> for fxversion and fxrubyversion.

Yes; this was done intentionally to distinguish between applications 
written for FXRuby 1.0 and applications written for FXRuby 1.2. See the 
change history:


and technically those instructions are not quite right; for the gem 
installation, you need to do this:

	require 'rubygems'
	require 'fox12'

A different approach (recommended by the RubyGems folk) is to just add 
"-rubygems" to your RUBYOPT environment variable so that the "rubygems" 
module is always automatically loaded when the Ruby interpreter starts 
up. If you've done that then you'd only need to do:

	require 'fox12'

> Do I have to "kill" 1.0 somehow?

You don't have to, no. They should be able to co-exist.

> BTW: I *do* have to do this, don't I?
>     require 'rubygems'
>     require_gem 'fxruby'
> since I installed with a gem?

As of the the latest version of RubyGems, you should be able to use 
either of the following forms:

	require 'rubygems'
	require_gem 'fxruby'


	require 'rubygems'
	require 'fox12'

I suppose I'd recommend the latter since that should work whether 
they've installed the code from a Gem or from some other source (like 
the source tarball, or RPA, or whatever).

I apologize for the confusion, but RubyGems has been a bit of a moving 
target over the last few months. There's still a pretty significant bug 
in RubyGems 0.8.1 that affects gem-based installations of FXRuby (or 
any other compiled extension) on Mac OS X. In retrospect it was 
probably a mistake to try to shift things over to RubyGems at the time 
that I did, but hopefully things will settle down as they head into the 
home stretch towards a RubyGems 1.0 release.



More information about the fxruby-users mailing list