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

E

eepeterson

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:in `open'
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:in `class_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: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 `<main>'

ANy ideas on how I can fix this?
 
E

eepeterson

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:in `open'
        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:in `class_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: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 `<main>'

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
 
A

Aaron Patterson

eepeterson said:
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:in `open'
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:in `class_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: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 `<main>'

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.
 
E

eepeterson

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.

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...
 
E

eepeterson

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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top