I recently started a private gem (that I can guarantee noone else is using) to wrap a niche database’s JDBC driver. I ended up just publishing a version of the gem that I would like a do-over on.
I understand how to yank a gem version, and the common solution of just bumping the version number and publishing that, which makes sense in most cases. However, it’s not so simple in my case as I would like to use the same gem version as the database driver I’m bundling (which seems to be a common practice), so bumping the version number isn’t an option. I also can’t do something clever like adding a .1 suffix to the database version number, as the database version has alphabet characters in it which make the ~> operator unusable (all versions are seen as pre-releases). In short, I need that exact version number.
My question is, if I yank all versions of the gem so that the gem name is available again in the RubyGems name pool, can I re-claim the gem name and push different code against the same gem versions I was using previously?
You can’t replace a gem, sorry. You must submit a new version.