Hello,
I’ve done some poking around and haven’t yet found a satisfactory
answer to this problem and it’s starting to be troublesome.
My development machine run MacOSX and I’ve installed Ruby 1.9.1 via
the MacPorts options. This puts everything into /opt/local and tags
executables with the version number (e.g. ruby becomes ruby1.9, ri
becomes ri1.9, etc.)
When I run ri to browse a class documentation, I get the following
error:
galactica:~ remillard$ ri GC
/opt/local/lib/ruby1.9/1.9.1/rdoc/ri/driver.rb:384:in initialize': Permission denied - /Users/remillard/.ri1.9/cache/.doc_dirs (Errno::EACCES) from /opt/local/lib/ruby1.9/1.9.1/rdoc/ri/driver.rb:384:in
open’
from /opt/local/lib/ruby1.9/1.9.1/rdoc/ri/driver.rb:384:in
create_class_cache' from /opt/local/lib/ruby1.9/1.9.1/rdoc/ri/driver.rb:371:in
class_cache’
from /opt/local/lib/ruby1.9/1.9.1/rdoc/ri/driver.rb:591:in block in run' from /opt/local/lib/ruby1.9/1.9.1/rdoc/ri/driver.rb:590:in
each’
from /opt/local/lib/ruby1.9/1.9.1/rdoc/ri/driver.rb:590:in run' from /opt/local/lib/ruby1.9/1.9.1/rdoc/ri/driver.rb:300:in
run’
from /opt/local/bin/ri:5:in `’
Now, my best guess is that there’s something funny about the paths
where MacPorts installed things, but I’ll be damned if I can figure
out what’s going on. When looking at my path I see:
galactica:~ remillard$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/
local/bin:/usr/X11/bin:/Users/remillard/bin
And it looks to me like the MacPorts path should be searched first.
The only thing I did was to go into /opt/local/bin and symlink the
simple names to the versioned names for convenience. However I still
get the same error if I run “ri1.9 GC” so I don’t think the symlinks
are causing any trouble.
Has anyone run into this with MacPorts, Ruby 1.9 and MacOSX?
Thanks for any information and help the community can suggest.
Best regards,
Mark Norton