/usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:384:in `initialize': Permission denied

I’m getting the following error when I try to run ‘ri’ command. I’m
running on Snow Leopard if that helps at all.

/usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:384:in initialize': Permission denied - /Users/erik_mbp/.ri/cache/.doc_dirs (Errno::EACCES) from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:384:inopen’
from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:384:in
create_class_cache' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:371:inclass_cache’
from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:591:in block in run' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:590:ineach’
from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:590:in run' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:300:inrun’
from /usr/local/bin/ri:5:in `’

ANy ideas on how I can fix this?

On Oct 20, 1:55 pm, eepeterson [email protected] wrote:

    from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:591:in `block in

run’
from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:590:in each' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:590:in run’
from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:300:in run' from /usr/local/bin/ri:5:in

ANy ideas on how I can fix this?

Oh, in case you need to know: when I type “which ruby” I get: /usr/
local/bin/ruby

eepeterson wrote:

from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:591:in block in run' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:590:ineach’
from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:590:in run' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:300:inrun’
from /usr/local/bin/ri:5:in `’

ANy ideas on how I can fix this?

Looks like you ran “ri” with some other user (probably root) and it
created a directory in your “.ri” directory that you cannot read. You
need to either fix the permissions here:

/Users/erik_mbp/.ri/cache/.doc_dirs

Look at the “chown” command.

Or just rm your “.ri” directory and like rdoc rebuild it.

On Oct 20, 2:35 pm, Aaron P. [email protected]
wrote:

from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:371:in `class_cache’
created a directory in your “.ri” directory that you cannot read. You
need to either fix the permissions here:

/Users/erik_mbp/.ri/cache/.doc_dirs

Look at the “chown” command.

Or just rm your “.ri” directory and like rdoc rebuild it.


Aaron P.http://tenderlovemaking.com/

any chance you could give me some further info on how to fix the
permissions. I’m slowing learning more terminal commands but still
need help obviously…

On Oct 20, 2:35 pm, Aaron P. [email protected]
wrote:

from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:371:in `class_cache’
created a directory in your “.ri” directory that you cannot read. You
need to either fix the permissions here:

/Users/erik_mbp/.ri/cache/.doc_dirs

Look at the “chown” command.

Or just rm your “.ri” directory and like rdoc rebuild it.


Aaron P.http://tenderlovemaking.com/

Aaron you are correct about the permissions issue. if I run the
command with sudo in front of it there are no problems. So how could I
chown to correct permisions and to what folder would I need to do that
to?

Thanks