[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

2 apps require different version same GEM

John Honovich

2/13/2008 1:01:00 AM

I have 2 apps that both require RubyInline (specifically ScrubyT and
freeimage).

ScrubyT seems to require 3.6.3 RubyInline while freeimage requires
3.6.6.

I just installed RubyInline and now ScrubyT is throwing an error.
Specifically, ScrubyT reports: "`activate': can't activate RubyInline (=
3.6.3), already activated RubyInline-3.6.6] (Gem::Exception)"


I have read that Ruby Gems allows multiple versions of a gem to be used
simultaneously but unfortunately

The RubyGems user guide says to specify specific version numbers in the
require statement (such as '= 3.6.3').

I went to the scrubyt.rb file with the intent to add this in the require
statement in RubyInline. Unfortunately, it seems RubyInline is being
required by a gem that ScrubyT is requiring.

Do I search for that gem and add this clause? Is there another way of
accomplishing this?

Thanks,

John
--
Posted via http://www.ruby-....

2 Answers

Daniel Sheppard

2/13/2008 2:57:00 AM

0

=20
> I went to the scrubyt.rb file with the intent to add this in=20
> the require
> statement in RubyInline. Unfortunately, it seems RubyInline is being
> required by a gem that ScrubyT is requiring.

If you require rubyinline with a version before the other requires, the
deep require of rubyinline should be a no-op.

Ryan Davis

2/13/2008 8:15:00 AM

0


On Feb 12, 2008, at 5:01 PM, John Honovich wrote:

> ScrubyT seems to require 3.6.3 RubyInline while freeimage requires
> 3.6.6.
>
> I just installed RubyInline and now ScrubyT is throwing an error.
> Specifically, ScrubyT reports: "`activate': can't activate
> RubyInline (=
> 3.6.3), already activated RubyInline-3.6.6] (Gem::Exception)"

Start by beating the author of scrubyt for specifying == instead of >=.

Next, switch your version specifiers from require to gem... whatever
rubygems doco you read is old and require with a version specifier is
deprecated:

gem 'inline', '>= 3.6.6'

Better... remove all version specifiers... there isn't anything across
those versions that requires locking in the version.

Follow that up with some cocoa.