How do you downgrade rubygems?

RubyRubygems

Ruby Problem Overview


I have rubygems 1.3.1 installed but I want to go back to 1.2.0. What's the command to downgrade rubygems?

Ruby Solutions


Solution 1 - Ruby

This worked for me when downgrading from 1.5.2 to 1.4.2 because of old rails version:

sudo gem update --system 1.4.2

More information about downgrading/upgrading rubygems: https://github.com/rubygems/rubygems/blob/master/UPGRADING.md

Solution 2 - Ruby

Updated November 2011: Now that RVM's out, try running rvm install rubygems <version>.

Solution 3 - Ruby

If you're using RVM, then you can do this to remove current ruby gems, then upgrade/downgrade rubygems:

rvm install rubygems 1.4.2

Solution 4 - Ruby

This just worked for me on OSX to get from 1.5.0 back to 1.4.2

sudo gem uninstall -v '1.5.0' rubygems-update
sudo gem update --system --local

Solution 5 - Ruby

I had a similar problem in an old Rails 3 stack. When these type of issues occur, my recommendation is to go onto the production server that the application is currently running in and check out which rubygems version it is using:

gem -v

For me, it was using 1.8.24. So all I needed to do is downgrade my current rubygems which was generated from "rvm install 1.9.3", when I installed the old ruby for this app. I ran the following command:

 $ rvm install rubygems 1.8.24 --force

And it worked. Note I am running Ubuntu 14.04 and the server I am using is also Ubuntu.

Solution 6 - Ruby

I used this command to go back to the gem version that my ruby version needed:

rvm rubygems current

If it gives checksum errors try

rvm rubygems current --verify-downloads 1

That did the trick for me.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionShalmaneseView Question on Stackoverflow
Solution 1 - RubypseidemannView Answer on Stackoverflow
Solution 2 - RubyRyan BiggView Answer on Stackoverflow
Solution 3 - RubyadzdaviesView Answer on Stackoverflow
Solution 4 - RubypatrickmcgrawView Answer on Stackoverflow
Solution 5 - RubyDonatoView Answer on Stackoverflow
Solution 6 - RubyAdrianView Answer on Stackoverflow