pt@pt-laptop:~$ ri Integer#times
/usr/local/ruby/lib/ruby/1.9.1/rdoc/ri/driver.rb:384:in initialize': Permission denied - /home/pt/.ri/cache/.doc_dirs (Errno::EACCES) from /usr/local/ruby/lib/ruby/1.9.1/rdoc/ri/driver.rb:384:in
open’
from /usr/local/ruby/lib/ruby/1.9.1/rdoc/ri/driver.rb:384:in
create_class_cache' from /usr/local/ruby/lib/ruby/1.9.1/rdoc/ri/driver.rb:371:in
class_cache’
from /usr/local/ruby/lib/ruby/1.9.1/rdoc/ri/driver.rb:591:in block in run' from /usr/local/ruby/lib/ruby/1.9.1/rdoc/ri/driver.rb:590:in
each’
from /usr/local/ruby/lib/ruby/1.9.1/rdoc/ri/driver.rb:590:in run' from /usr/local/ruby/lib/ruby/1.9.1/rdoc/ri/driver.rb:300:in
run’
from /usr/local/ruby/bin/ri:5:in `’
pt@pt-laptop:~$ sudo ri Integer#times
[sudo] password for pt:
sudo: ri: command not found
pt@pt-laptop:~$ sudo /usr/local/ruby/lib/ruby/1.9.1/rdoc/ri
Integer#times
sudo: /usr/local/ruby/lib/ruby/1.9.1/rdoc/ri: command not found
pt@pt-laptop:~$ cd /usr/local/ruby/lib/ruby/1.9.1/rdoc/ri
pt@pt-laptop:/usr/local/ruby/lib/ruby/1.9.1/rdoc/ri$ ls
cache.rb display.rb formatter.rb reader.rb writer.rb
descriptions.rb driver.rb paths.rb util.rb
pt@pt-laptop:/usr/local/ruby/lib/ruby/1.9.1/rdoc/ri$
why can’t i use my ri?how can i do?
Hello Pen,
2010/4/8 Pen T. [email protected]:
pt@pt-laptop:~$ ri Integer#times
/usr/local/ruby/lib/ruby/1.9.1/rdoc/ri/driver.rb:384:in `initialize’:
Permission denied - /home/pt/.ri/cache/.doc_dirs (Errno::EACCES)
It seems that there are some directory you can’t read in ~/.ri.
Try
sudo chown -R pt home/pt/.ri
to recursively regain access to the directories, it should solve at
least this issue.
Cheers,
sudo find / -name ‘ri’
the following is what i get
/usr/local/ruby/lib/ruby/1.9.1/rdoc/ri
/usr/local/ruby/lib/ruby/gems/1.9.1/doc/hpricot-0.8.2/ri
/usr/local/ruby/lib/ruby/gems/1.9.1/doc/rubygems-update-1.3.6/ri
/usr/local/ruby/lib/ruby/gems/1.9.1/doc/fastri-0.3.1.1/ri
/usr/local/ruby/lib/ruby/gems/1.9.1/doc/rubygems-1.3.6/ri
/usr/local/ruby/lib/ruby/gems/1.9.1/doc/nokogiri-1.4.1/ri
/usr/local/ruby/lib/ruby/gems/1.9.1/doc/fastercsv-1.5.3/ri
/usr/local/ruby/share/ri
/usr/local/ruby/bin/ri
/home/pt/ruby-1.9.1-p378/lib/rdoc/ri
/home/pt/ruby-1.9.1-p378/bin/ri
/home/pt/.gem/ruby/1.9.1/doc/mailfactory-1.4.0/ri
/home/pt/.gem/ruby/1.9.1/doc/ruport-util-0.14.0/ri
/home/pt/.gem/ruby/1.9.1/doc/mime-types-1.16/ri
/etc/bash_completion.d/ri
how can i do?
pt@pt-laptop:~$ ls -la /home/pt/.ri
total 20
drwxr-xr-x 3 root root 4096 2010-03-24 18:35 .
drwxr-xr-x 162 pt pt 12288 2010-04-09 21:40 …
drwxr-xr-x 2 root root 4096 2010-03-24 18:35 cache
pt@pt-laptop:~$ sudo chown -R pt home/pt/.ri
[sudo] password for pt:
chown: cannot access `home/pt/.ri’: No such file or directory
pt@pt-laptop:~$
how can i do?help me, think you
Hello Pen,
2010/4/8 Pen T. [email protected]:
sudo find / -name ‘ri’
The directory ‘ri’ is looking for is not called ‘ri’ but ‘.ri’ (note
the dot at the beginnining of the name that make the directory
‘invisible’ from a simple ‘ls’). Try
ls -la /home/pt/.ri
to look at it directly. What did the command
sudo chown -R pt home/pt/.ri
answer to you ?
Cheers,
2010/4/9 Pen T. [email protected]:
pt@pt-laptop:~$ ls -la /home/pt/.ri
total 20
drwxr-xr-x 3 root root 4096 2010-03-24 18:35 .
drwxr-xr-x 162 pt pt 12288 2010-04-09 21:40 …
drwxr-xr-x 2 root root 4096 2010-03-24 18:35 cache
pt@pt-laptop:~$ sudo chown -R pt home/pt/.ri
[sudo] password for pt:
chown: cannot access `home/pt/.ri’: No such file or directory
pt@pt-laptop:~$
Sorry, typo on my side. It should be read
sudo chown -R pt /home/pt/.ri
(forgot the root slash). That should work now.
Cheers,