First I suggest you save your gem list, just in case:
$ gem list > gems.txt
To verify that you're using the SPEC CACHE that you think you are:
$ gem env | grep "SPEC CACHE"
- SPEC CACHE DIRECTORY: /home/sawa/.gem/specs
To see if you have any outdated sources:
$ gem sources
If you want to be careful, you can remove sources one by one, then re-add. (See code below)
Try pristine, though it will likely fail:
$ gem pristine --all
The harsh approach is to delete all the gem specs:
rm -rf /home/sawa/.gem/specs
The nuclear approach is to delete the gem directory, which you write that you've already tried:
rm -rf /home/sawa/.gem
My best guess is that one of your gem sources is returning an incorrect file, possibly a temporary problem. You can figure this out by removing all your gem sources.
$ gem sources -?-clear-all # clears the cache, but doesn't remove the source
$ gem sources --update # probably will work, in which case you can stop now.
If clearing the sources doesn't work, then you can remove all and re-add:
$ gem sources
$ gem sources --remove http://gems.rubyforge.org/
$ gem sources --remove http://gems.github.com
...etc ...
$ gem sources -?-update # should work fine, because there are no sources
$ gem sources --add http://gems.rubyforge.org/
$ gem sources --update
$ gem sources --add http://gems.github.com
$ gem sources --update
...etc...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…