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
galactica:~ remillard$ ri GC
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:inopen’
create_class_cache' from /opt/local/lib/ruby1.9/1.9.1/rdoc/ri/driver.rb:371:inclass_cache’
block in run' from /opt/local/lib/ruby1.9/1.9.1/rdoc/ri/driver.rb:590:ineach’
run' from /opt/local/lib/ruby1.9/1.9.1/rdoc/ri/driver.rb:300:inrun’
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
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.