Mac OS X gem cleanup failing

After upgrading to Snow Leopard I started noticing that whenever I would run sudo gem cleanup it would fail with many errors about being unable to uninstall various gems. I ignored it until the list grew unbearably long but the only solutions I could find on the web were to go through one gem at a time. The errors looked like this:

Following the instructions I then rangem list -d rails noting the install path for newer gems was now /Library/Ruby/Gems/1.8 whereas the older gems that cleanup was failing on were in /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8. So the solution was to run cleanup once while overriding GEM_HOME as follows:

This article is very useful. I have used my Mac for years and did not notice my hard disk is consuming by the useless files. This article helped me much. I also found another free cleanup software. http://www.easemac.com It is free and effective.

If you are experiencing a slow Mac due to huge amount of junk files present on your Mac HDD then you must pick up Stellar Speed up Mac to clean the junks that are present on your Mac.

About Me

I live in San Francisco and am the Co-Founder of Two Bit Labs where we develop iPhone, iPad, and Android mobile apps for our clients. I love the mix of team leadership and working as a hands-on contributor. My technical passions include Swift, Kotlin, Ruby, Cloud Computing, and open-source software.

I also love to sail and my wife, daughter, and I sailed out the Golden Gate in 2007 on our 38 foot Hans Christian cutter (sailboat) on a 3 year cruise. Read about it at http://sailsugata.com.