I can’t upgrade RubyGems from 1.1.1 to 1.2.0 on Ubuntu
This post was written by John Trupiano. Read other posts by John Trupiano.
Just a quick little snippet here. RubyGems 1.2.0 dropped roughly two weeks ago….however, I’d been having trouble getting my 1.1.1 installs on Ubuntu to update properly.
john@john-ubuntu:~/passenger-recipes$ gem -v 1.1.1 john@john-ubuntu:~/passenger-recipes$ sudo gem update --system Updating RubyGems Nothing to update john@john-ubuntu:~/passenger-recipes$ gem -v 1.1.1 john@john-ubuntu:~/passenger-recipes$ sudo gem update --system Updating RubyGems Nothing to update
The first few times I ran into this, I was too busy to figure out what was wrong and ignored it. However, there is one HUGE TIME SAVER in 1.2.0 that I just couldn’t wait for any longer. Up through 1.1.1, gem update and gem install calls both updated all locally cached gemspec’s from your gem sources. This not only led to large memory consumption (anyone on a VPS got a horror story?), but was also just a plain waste of time. If I know which gem I want to update, it should just update that gem. The onus should be on me specify that I want to fully update my cache.
That said, I finally came across Eric Hodel’s notice addressing this very problem. The solution:
john@john-ubuntu:~/passenger-recipes$ sudo gem install rubygems-update -v 1.1.1 Bulk updating Gem source index for: http://gems.rubyforge.org/ Successfully installed rubygems-update-1.1.1 1 gem installed john@john-ubuntu:~/passenger-recipes$ sudo gem update --system Updating RubyGems Updating rubygems-update Successfully installed rubygems-update-1.2.0 Updating version of RubyGems to 1.2.0 Installing RubyGems 1.2.0 ... ... (success) ... john@john-ubuntu:~/passenger-recipes$ gem -v 1.2.0
Happy upgrading.
About the author: John co-founded SmartLogic Solutions with Yair in May 2005. He is actively involved with the Ruby and Rails communities. Check out John's GitHub Projects or follow @jtrupiano on twitter
August 14th, 2008 at 12:22 am
Downloading rubygems-update-1.2.0.gem and installing it from local also worked for me. Thx.
September 14th, 2008 at 9:03 pm
[...] I manually updated to rubygems v1.1.1 as per this post and then ran [...]
September 21st, 2008 at 3:15 pm
Thanks for saving me a bit of time