Clearing the gem source_cache in Ruby
I was trying to install a Ruby Gem when I got the following error message:
The Clearing the gem source_cache in Ruby article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find xhtmldiff (> 0) in the repository
Googling around, I found out that this error may mean that the source cache is corrupt. Sure enough, that was the problem.
To fix it, under Locomotive, I deleted the following file:
/Applications/Locomotive2/Bundles/rails112.locobundle/i386/lib/ruby/gems/1.8/source_cache
And that fixed it!
The Clearing the gem source_cache in Ruby article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.

Anselm Bradford
Aral,
You’ve become my main source for being in the know with Web 2.0. I hope you do consider yourself a journalist, because I am sure you fill that role for many people.
With that said, I have been seeing you post a lot about Ruby recently, and I wonder what your thoughts on it are in terms of how it compares to other languages out there? More specifically what your thoughts are on several web-related technologies that seem to, until recently, been staying out of the limelight. For instance, any thoughts on how Ruby on Rails compares to PHP? Having become very used to actionscript (and loving it) I find PHP horribly loose in its syntax, to the point of promoting bad coding behavior. I wonder if it is due for a change itself or a changing of the guard. Any comment on haXe or openLaszlo? What should a web developer be learning and using these days?
Thanks and take care,
October 22nd, 2006 at 5:17 pm-Ans
Mike
It’s weird,I removed it ,but when i input
gem install rails –include-dependencies &
it still complains:
$ Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find rails (> 0) in any repository
then I input :
May 5th, 2007 at 1:33 pmcd “
Mike
thanks, I have encountered the same problem,perhaps. I rmed the source_cache as you did, then
gem install rails –include-dependencies &
it still complains:
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem … (Gem::GemNotFoundException)
Could not find rails (> 0) in any repository
then I checked again :
cd `gem env gempath`
cache/ doc/ gems/ specifications/ source_cache
the file source_cache came back!
I tried times but it still didn’t work.
any suggestions? thanks in advance .
my environment :
platform : cygwin (works well)
May 5th, 2007 at 1:34 pmruby: ruby 1.8.5 (well too)
Wilson
Hey… I’m experiencing the same problem. I’ve spent about two days playing with this. I think i might’ve finally figured out the solution:
%gem cleanup
%sudo gem update
This seemed to work for me? I was having problems getting on the rubyforge site also…
May 11th, 2007 at 3:58 pmThe source_cache is always gonna come back by the way.
Rashid
Thanks, Dude.
August 16th, 2007 at 6:05 amThat seems to have worked.
Also, I liked the talking bunny… nice!
Ryan
Hi,
I was googling and trying the suggestions around the web for the same issues on CentOS 4 when I came across your post.
Worked for me! Thanks a bunch.
November 5th, 2007 at 5:10 pmWarren
Hey Wilson nice tip that one.
gem cleanup
gem update
Thanks
December 13th, 2007 at 3:29 am