# Permission error in "ri" command

**URL:** <https://www.ruby-forum.com/t/permission-error-in-ri-command/176344>\
**Category:** Ruby\
**Created:** [September 29, 2009, 11:01am UTC](https://www.ruby-forum.com/t/permission-error-in-ri-command/176344 "2009-09-29T11:01:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hunt\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b9e5f3/32.png) [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Post date:** [September 29, 2009, 11:01am UTC](https://www.ruby-forum.com/t/permission-error-in-ri-command/176344/1 "2009-09-29T11:01:01Z")

</div>

Hi - I get the following error when I run “ri” command.  
I’m using Mac OS X Snow Leopard. I installed Ruby with MacPorts.

/opt/local/lib/ruby/gems/1.8/gems/rdoc-2.3.0/lib/rdoc/ri/driver.rb:405:in  
`initialize': Permission denied - /Users/jon/.ri/cache/.doc_dirs (Errno::EACCES) from /opt/local/lib/ruby/gems/1.8/gems/rdoc-2.3.0/lib/rdoc/ri/driver.rb:405:in`open’  
from  
/opt/local/lib/ruby/gems/1.8/gems/rdoc-2.3.0/lib/rdoc/ri/driver.rb:405:in  
`create_class_cache' from /opt/local/lib/ruby/gems/1.8/gems/rdoc-2.3.0/lib/rdoc/ri/driver.rb:389:in`class\_cache’  
from  
/opt/local/lib/ruby/gems/1.8/gems/rdoc-2.3.0/lib/rdoc/ri/driver.rb:474:in  
`display_name' from /opt/local/lib/ruby/gems/1.8/gems/rdoc-2.3.0/lib/rdoc/ri/driver.rb:787:in`run’  
from  
/opt/local/lib/ruby/gems/1.8/gems/rdoc-2.3.0/lib/rdoc/ri/driver.rb:786:in  
`each' from /opt/local/lib/ruby/gems/1.8/gems/rdoc-2.3.0/lib/rdoc/ri/driver.rb:786:in`run’  
from  
/opt/local/lib/ruby/gems/1.8/gems/rdoc-2.3.0/lib/rdoc/ri/driver.rb:315:in  
`run' from /opt/local/lib/ruby/gems/1.8/gems/rdoc-2.3.0/bin/ri:5 from /opt/local/bin/ri:19:in`load’  
from /opt/local/bin/ri:19

Can anybody help solve this issue?

-jon

---

<div class="post-metadata">

**Author:** ![Hunt\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b9e5f3/32.png) [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Post date:** [September 29, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/permission-error-in-ri-command/176344/2 "2009-09-29T19:37:35Z")

</div>

First things first: does the file exist?  
/Users/jon/.ri/cache/.doc\_dirs
