[Rubygems-developers] [ rubygems-Bugs-29074 ] Can't upgrade to newer rubygems version with explicit version number

noreply at rubyforge.org noreply at rubyforge.org
Tue Mar 15 08:41:59 EDT 2011


Bugs item #29074, was opened at 2011-03-10 17:44
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=29074&group_id=126

Category: None
Group: None
Status: Open
Resolution: Accepted
Priority: 3
Submitted By: Martin Tepper (mgpalmer)
Assigned to: Ryan Davis (zenspider)
Summary: Can't upgrade to newer rubygems version with explicit version number

Initial Comment:
Hi everybody !

I've already briefly explained the problem here:

http://help.rubygems.org/discussions/problems/514-cant-upgrade-to-newer-rubygems-version-with-explicit-version-number

Basically, upgrading rubygems to a specific, higher-than-now version (or the latest version) doesn't work as it is. You can workaround by installing rubygems-update manually, but I think it's quite unobvious why you can't just tell the target version and be done with it.

I've poked around in the code and found a solution. Here's my take on it:

https://github.com/MGPalmer/rubygems/commit/a1bd03cd597a3a0fc1d13059c582ac7266c34fb8

I haven't really contributed to a project before like this, is there anything else I need to do ? Run tests etc. ?

Thanks for all your work on the ruby ecosystem !

Best regards,
Martin Tepper

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

>Comment By: Martin Tepper (mgpalmer)
Date: 2011-03-15 13:41

Message:
I've cleaned up the spec: 
https://github.com/MGPalmer/rubygems/commit/2ebbfc71ea5548df8
d3bab6bffe3524324bff211

Please also see my comment on your comment - IMHO, making it 
easier for developers is more important in this case. But 
changing the test style is not my mission here :)

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

Comment By: Martin Tepper (mgpalmer)
Date: 2011-03-11 17:27

Message:
Alrighty:

The test:

https://github.com/MGPalmer/rubygems/commit/a3c6ac8663032fcb
c84d4a1193ec246fd4143fb3

The fix: 
https://github.com/MGPalmer/rubygems/commit/a57fde4082e76e69
2e292c9312e935f3282f61de

And to get all tests working for me locally, I had to fix 
this:

https://github.com/MGPalmer/rubygems/commit/f97755c77ece0929
0e7536e367fa07ce69b363cd

It doesn't seem to be connected with the other changes, as I 
got this error when running the tests against the vanilla 
1.6.2 rubygems, but I didn't want to leave the error in. 
Feel free to ignore this.

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

Comment By: Martin Tepper (mgpalmer)
Date: 2011-03-11 08:34

Message:
Ah yes. Sorry, it actually only fails when trying to install 
explicitly the latest online version:

$ sudo gem update --system 1.6.1 --no-rdoc --no-ri
Updating rubygems-update
Successfully installed rubygems-update-1.6.1
Installing RubyGems 1.6.1
RubyGems 1.6.1 installed

...

$ sudo gem update --system 1.6.2 --no-rdoc --no-ri
Latest version currently installed. Aborting.

I'll make a test for that.


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

Comment By: Eric Hodel (drbrain)
Date: 2011-03-10 23:17

Message:
I can't reproduce:

$ sudo gem update --system 1.6.0 --no-rdoc --no-ri
Updating rubygems-update
Successfully installed rubygems-update-1.6.0
Installing RubyGems 1.6.0
RubyGems 1.6.0 installed
…
$ sudo gem update --system 1.6.1 --no-rdoc --no-ri
Updating rubygems-update
Successfully installed rubygems-update-1.6.1
Installing RubyGems 1.6.1
RubyGems 1.6.1 installed
…
$ sudo gem update --system 1.6.0 --no-rdoc --no-ri
Updating rubygems-update
Successfully installed rubygems-update-1.6.0
Installing RubyGems 1.6.0
RubyGems 1.6.0 installed
…
$ sudo gem update --system --no-rdoc --no-ri
Updating rubygems-update
Fetching: rubygems-update-1.6.2.gem (100%)
Successfully installed rubygems-update-1.6.2
Installing RubyGems 1.6.2
RubyGems 1.6.2 installed

Your commit does not have any test changes. I would like to see a failing test first as the update functionality does have tests.

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

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


More information about the Rubygems-developers mailing list