# 2 apps require different version same GEM

**URL:** <https://www.ruby-forum.com/t/2-apps-require-different-version-same-gem/128966>\
**Category:** Ruby\
**Created:** [February 13, 2008, 2:01am UTC](https://www.ruby-forum.com/t/2-apps-require-different-version-same-gem/128966 "2008-02-13T02:01:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jh100000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b2d939/32.png) [@jh100000](https://www.ruby-forum.com/u/jh100000)\
**Post date:** [February 13, 2008, 2:01am UTC](https://www.ruby-forum.com/t/2-apps-require-different-version-same-gem/128966/1 "2008-02-13T02:01:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jh100000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b2d939/32.png) [@jh100000](https://www.ruby-forum.com/u/jh100000)\
**Post date:** [February 13, 2008, 3:57am UTC](https://www.ruby-forum.com/t/2-apps-require-different-version-same-gem/128966/2 "2008-02-13T03:57:52Z")

</div>

> 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.

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

---

<div class="post-metadata">

**Author:** ![jh100000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b2d939/32.png) [@jh100000](https://www.ruby-forum.com/u/jh100000)\
**Post date:** [February 13, 2008, 9:15am UTC](https://www.ruby-forum.com/t/2-apps-require-different-version-same-gem/128966/3 "2008-02-13T09:15:59Z")

</div>

On Feb 12, 2008, at 5:01 PM, John H. 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.

---

<div class="post-metadata">

**Author:** ![jh100000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b2d939/32.png) [@jh100000](https://www.ruby-forum.com/u/jh100000)\
**Post date:** [December 11, 2010, 4:46am UTC](https://www.ruby-forum.com/t/2-apps-require-different-version-same-gem/128966/4 "2010-12-11T04:46:21Z")

</div>

I have the same dependency problems pretty often and they really put a  
spanner in the works.

`activate’: can’t activate RubyInline (= 3.7.0, runtime) for  
[“tomdoc-0.1.0”], already activated RubyInline-3.8.6 for  
[“ParseTree-3.0.5”, “tomdoc-0.1.0”] (Gem::LoadError)

What do people do in these situations? Is it possible to activate  
specific gem version for specific gem(s) , or does that make no sense?
