Installing rdoc 2.4.3 ruby gem from source

written by seb on May 10th, 2010 @ 09:55 AM

Have you ever messed up with your gems? Well, I did!

Having a conflict with rdoc versions I felt the need to remove rdoc 2.4.3
As personal advise, if you read this article before you do so, DO NOT DO IT ;-)

I'm on snow leopard and once rdoc 2.4.3 uninstalled all rubygems got blocked. Not even possible to install local gems with


gem install -l path/to/my/local/gem.gem

Installing rdoc 2.4.3 from source

What to do next, `gem` command broken, ... I went for the source installation downloading the tarball rdoc-2.4.3.tgz

Install the gem source

First things first, we need to untar the rdoc source in the appropriate folder and give it the right permissions


mv rdoc-2.4.3.tgz /Library/Ruby/Gems/1.8/gems/
cd /Library/Ruby/Gems/1.8/gems/
tar xvzf rdoc-2.4.3.tgz
sudo chown -R root:admin rdoc-2.4.3

Install the gem file as cache

Download the gem file, and save it as cachedrdoc-2.4.3.gem


mv rdoc-2.4.3.gem /Library/Ruby/Gems/1.8/cache/
sudo chown root:admin /Library/Ruby/Gems/1.8/cache/rdoc-2.4.3.gem

Install the gemspec file

Here came a problem, where to find the gemspec?
I couldn't find so asked a friend, Sébastien Gruhier from Xilinus, thanks to him you can download rdoc-2.4.3.gemspec


mv rdoc-2.4.3.gemspec /Library/Ruby/Gems/1.8/specifications/
sudo chown root:admin /Library/Ruby/Gems/1.8/specifications/rdoc-2.4.3.gemspec

From this point, I was able to run `gem list` again, and all went back to normal, conflict included ;-)

Comments are closed