What is the difference between this command:
gem update --system
And these commands:
gem install rubygems-update
update_rubygems
gem update --system
I would've assumed that the former would be all that is required in order to update to the latest version of RubyGems, but I have found many references (including https://stackoverflow.com/a/13626200/1369417) which recommend the latter.
gem install rubygems-update; update_rubygems
was needed in some old versions of rubygems, but gem update --system
is all that's needed for the foreseeable future.
rubygems 1.1 and 1.2 had bugs that prevented gem update --system
from working the first time, so you had to use those first two commands to upgrade at all. There would be no reason to run gem update --system
immediately thereafter, because rubygems would already be updated, but doing so would demonstrate that you would be able to run that command in the future.
Versions of rubygems before 1.5.2 did not accept a version argument following gem update --system
, so you had to use the first two commands you give to install an arbitrary version of rubygems. You wouldn't want to run gem update --system
immediately thereafter; it would undo what you'd just done.
More here: https://github.com/rubygems/rubygems/blob/master/UPGRADING.md
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With