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

**URL:** <https://www.ruby-forum.com/t/usr-local-lib-ruby-1-9-1-rdoc-ri-driver-rbin-initialize-permission-denied/177601>\
**Category:** Ruby\
**Created:** [October 20, 2009, 8:00pm UTC](https://www.ruby-forum.com/t/usr-local-lib-ruby-1-9-1-rdoc-ri-driver-rbin-initialize-permission-denied/177601 "2009-10-20T20:00:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eepeterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/4bbf92/32.png) [@eepeterson](https://www.ruby-forum.com/u/eepeterson)\
**Post date:** [October 20, 2009, 8:00pm UTC](https://www.ruby-forum.com/t/usr-local-lib-ruby-1-9-1-rdoc-ri-driver-rbin-initialize-permission-denied/177601/1 "2009-10-20T20:00:45Z")

</div>

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 `’

ANy ideas on how I can fix this?

---

<div class="post-metadata">

**Author:** ![eepeterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/4bbf92/32.png) [@eepeterson](https://www.ruby-forum.com/u/eepeterson)\
**Post date:** [October 20, 2009, 8:01pm UTC](https://www.ruby-forum.com/t/usr-local-lib-ruby-1-9-1-rdoc-ri-driver-rbin-initialize-permission-denied/177601/2 "2009-10-20T20:01:55Z")

</div>

On Oct 20, 1:55 pm, eepeterson [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![eepeterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/4bbf92/32.png) [@eepeterson](https://www.ruby-forum.com/u/eepeterson)\
**Post date:** [October 20, 2009, 8:35pm UTC](https://www.ruby-forum.com/t/usr-local-lib-ruby-1-9-1-rdoc-ri-driver-rbin-initialize-permission-denied/177601/3 "2009-10-20T20:35:52Z")

</div>

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: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?

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.

---

<div class="post-metadata">

**Author:** ![eepeterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/4bbf92/32.png) [@eepeterson](https://www.ruby-forum.com/u/eepeterson)\
**Post date:** [October 20, 2009, 8:40pm UTC](https://www.ruby-forum.com/t/usr-local-lib-ruby-1-9-1-rdoc-ri-driver-rbin-initialize-permission-denied/177601/4 "2009-10-20T20:40:33Z")

</div>

On Oct 20, 2:35 pm, Aaron P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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/](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…

---

<div class="post-metadata">

**Author:** ![eepeterson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/4bbf92/32.png) [@eepeterson](https://www.ruby-forum.com/u/eepeterson)\
**Post date:** [October 20, 2009, 9:25pm UTC](https://www.ruby-forum.com/t/usr-local-lib-ruby-1-9-1-rdoc-ri-driver-rbin-initialize-permission-denied/177601/5 "2009-10-20T21:25:37Z")

</div>

On Oct 20, 2:35 pm, Aaron P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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/](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
