rubygems can't uninstall gems that have broken specifications #419

erikh opened this Issue Dec 21, 2012 · 1 comment


None yet
2 participants

erikh commented Dec 21, 2012

I released a gem earlier today with this gemspec:

The line is broken and creates a dependency on "knife-server ~>0.3.2", which is the name of the gem. This is due to how string concatenation works in ruby. Obviously the gem is broken and that gem name will never exist.

The underlying issue though is that anyone who installed this gem will now get a ton of garbage about broken specifications when rubygems fires up. That would be less of an issue if you could use rubygems to uninstall it -- but you can't, because rubygems doesn't allow it to exist unless the specification works.

I know this probably isn't an easy problem to solve, but I don't know if going in and removing the specification file is a working solution for most users either.

And sincerest apologies for my terribad programming. Merry Mayan Apocalypse!


drbrain commented Dec 21, 2012

Two bugs to fix here:

  1. Don't install specs RubyGems can't read
  2. Allow cleanup of broken specs

@drbrain drbrain added a commit that referenced this issue Dec 22, 2012

@drbrain drbrain Fail installation if the spec cannot be read
This prevents RubyGems from installing a gem that has corruption or
invalid data in it.

Part of #419

drbrain closed this in 0832b64 Dec 22, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment