From: Eric Hodel Date: 2006-09-13T11:27:00+09:00 Subject: Re: Can't install gems with sudo On Sep 12, 2006, at 5:42 PM, Gavin Kistner wrote: > I just built ruby 1.8.5 myself, and now rubygems can't find remote > gems when I run it with sudo privs. It can find the gems when I run > it as myself, but then it doesn't have priviliges needed to install > the gem. Did I miss something obvious? > > [Sliver:~] gkistner$ which ruby > /usr/local/bin/ruby > [Sliver:~] gkistner$ which gem > /usr/local/bin/gem > [Sliver:~] gkistner$ ruby -v > ruby 1.8.5 (2006-08-25) [powerpc-darwin8.7.0] > [Sliver:~] gkistner$ gem -v > 0.9.0 > [Sliver:~] gkistner$ sudo gem install rake > ERROR: While executing gem ... (Gem::GemNotFoundException) > Could not find rake (> 0) in the repository > [Sliver:~] gkistner$ gem install rake > ERROR: While executing gem ... (Errno::EACCES) > Permission denied - /usr/local/lib/ruby/gems/1.8/cache/ > rake-0.7.1.gem Your source cache may be corrupt. Try: rm /usr/local/lib/ruby/gems/1.8/source_cache (You also have one in ~/.gem/source_cache) -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com