From: Paul Lutus Date: 2006-09-13T10:20:41+09:00 Subject: Re: Can't install gems with sudo 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$ 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 Looks like sudo might be giving you a dodgy path. Try this: $ echo $PATH $ sudo echo $PATH Are they different? -- Paul Lutus http://www.arachnoid.com