This project is archived and is in readonly mode.

#527 ✓resolved
Tiago Macedo

Problem with gem dependency detection of frozen gems

Reported by Tiago Macedo | July 1st, 2008 @ 06:12 PM | in 2.x

There is a problem with gem dependency in rails 2.1 and head.

If you specify your gem dependency with a <= or >= version string, the gem dependency won't detect if you have a frozen gem that isn't the specified version even if it satisfies the requirement.


config.gem "ruby-openid", :lib => "openid", :version => ">=2.0.4"

If you have ruby-openid-2.1.2 installed and type rake gems:unpack it'll freeze in vendor/gems.

However if you type rake:gems afterwards, it'll tell that it is installed and not frozen because it is looking for it under vendor/gems/ruby-openid-2.0.4 instead of vendor/gems/ruby-openid-2.1.2

What the patch does is:

Search vendor/gems for gems that match the required gem name and satisfy the required version. If more than one matching gem is found, the gem with the biggest version number is loaded.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

Referenced by