[Rubygems-developers] [ rubygems-Bugs-28806 ] Re-install of a gem can leave prior gem files remaining

noreply at rubyforge.org noreply at rubyforge.org
Tue Mar 1 22:58:57 EST 2011


Bugs item #28806, was opened at 2010-12-28 17:26
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28806&group_id=126

Category: `gem install` command
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: David Kellum (dekellum)
Assigned to: Ryan Davis (zenspider)
Summary: Re-install of a gem can leave prior gem files remaining

Initial Comment:
The problem arises when the contents of gem change over multiple builds with the same gem version, typically when a gem is under development and installed repeatedly to a local gem home.  There are several cases where gems load or otherwise use all files in a particular directory within the gem install dir.  When a file is removed or renamed over subsequent builds, old files from the prior "gem install" will remain after the new "gem install", leading to often unexpected behavior.

One specific example would be gem packaged ActiveRecord migrations directory, where all migrations in a gem installed "db/" directory are applied.

To avoid any chance of inconsistent behavior from prior installed gem files, it would be best if the gem Installer removed all old files from the gem_dir before installing the new files.

It looks like an easy change. I will offer a patch for this issue up on github.


----------------------------------------------------------------------

>Comment By: Ryan Davis (zenspider)
Date: 2011-03-01 19:58

Message:
Thanks!

----------------------------------------------------------------------

Comment By: David Kellum (dekellum)
Date: 2011-02-08 07:04

Message:
New Pull Request with test case:

https://github.com/rubygems/rubygems/pull/29

----------------------------------------------------------------------

Comment By: David Kellum (dekellum)
Date: 2010-12-28 17:35

Message:
Pull request: 

https://github.com/rubygems/rubygems/pull/18

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=28806&group_id=126


More information about the Rubygems-developers mailing list