How to change platform of existing gem
We have a gem on rubygems.org where the platform was recently fixed from being 'jruby' (incorrect) to 'java' (correct!)
See: http://rubygems.org/gems/pacer/versions
Now, only the most recent gem has the correct platform. What is the best way to fix the older versions of the gem to have the correct platform? They are currently unusable by the latest version of bundler as it's (now) validating the gemspec prior to installation.
Regards,
David
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Evan Phoenix on 16 Apr, 2012 05:08 PM
I suggest you yank those older versions. We don't support the ability to change the platform of a gem.
Evan Phoenix closed this discussion on 16 Apr, 2012 05:08 PM.
Luis Lavena re-opened this discussion on 16 Apr, 2012 05:09 PM
Support Staff 3 Posted by Luis Lavena on 16 Apr, 2012 05:09 PM
Short answer: you can't
Long answer: gems were automatically downloaded by mirrors and also downloaded by users. You can't push gems over existing ones because downloaded won't equal cached and you can evict cached gems for end-user systems.
Once a gem has been pushed, was pushed.
If you want to avoid a gem from being installed, you can yank it.
Luis Lavena closed this discussion on 16 Apr, 2012 05:16 PM.
David Colebatch re-opened this discussion on 16 Apr, 2012 06:29 PM
4 Posted by David Colebatch on 16 Apr, 2012 06:29 PM
I get it, and hopefully this work-around committed in the bundler gem
codebase will fix our problems too:
https://github.com/carlhuda/bundler/commit/8ef7b59427321cec7409408d02b7ea4fd0beb9a4
...I suppose it's just a PITA that we were allowed to push gems with
invalid .gemspec's in the first place!
Thanks for your efforts!
Support Staff 5 Posted by Eric Hodel on 16 Apr, 2012 11:20 PM
If you're releasing a platform gem with JRuby then this is wrong:
https://github.com/pangloss/pacer/blob/develop/pacer.gemspec#L8
If you use Gem::Platform::CURRENT it will set the platform correctly for your packaged gem.
Eric Hodel closed this discussion on 16 Apr, 2012 11:20 PM.