On Tue, 16 Dec 2003, Dave Thomas wrote:

# 
# On Dec 15, 2003, at 15:59, Chad Fowler wrote:
# 
# > OWe have actually been doing the following for RubyGems (so far--we're 
# > of
# > course open for suggestions):
# >
# > /usr/lib/ruby/gems/#{ruby_version}/doc/#{gem_name}-#{gem_version}
# >
# > ...this is, of course, the standard rdoc html output--not the new ri
# > intermediate form.
# 
# The problem here is that 'ri' will have a hard job finding the most 
# current among all these directories: I'm keen not to slow things down 
# too much.
# 


I agree that it's potentially a bit messy, but I wouldn't put too much 
emphasis on speed.  I just ran a very unscientific test on my 
Windows-based laptop, and only hit around 800ms with 10,000 libraries 
"installed", including doing version comparisons (using David Black's 
version.rb from RubyGems) to find the highest version of each library.  
(note: the 10,000 "libraries" were really just 10,000 programatically 
generated subdirectories).


# It would be nice to have symbolic links so that:
# 
#     gems/1.8/doc/fred-latest
# 
# could always reference the latest version of 'fred' that's installed, 
# but I guess that couldn't work under Windows.

Yea, that's too bad.

# Perhaps the simplest 
# thing would be always to install documentation to
# 
#     site_ruby/1.8/doc/...
# 
# and _also_ install it under the gems structure above. That way, 'ri 
# fred' would always find the last version installed, while you could 
# geta  specific version by giving ri a path to the specific doc 
# directory:
# 
#    ri -d /usr/local/ruby/gems/1.8/doc/...


That makes sense.  Duplicating the data puts me off a bit, but at least 
it's *generated* duplicate stuff.


# 
# However, I'd also question the gems structure here. Shouldn't the gems 
# stuff be under site_ruby? Perhaps
# 
#      /usr/local/ruby/site_ruby/1.8/gems/....
# 


Good question.  I don't have a strong opinion on this one, but I think the 
idea was that RubyGems are not really like the stuff that normally goes 
under site_ruby, so they should be contained in a new path, parrallel to 
site_ruby.  An installed RubyGem is a full directory that can be added to 
$:, as opposed to just being files and directories that are picked up in 
the normal $:.  




# I have to admit I'm still confused by the Ruby directory standards: 
# some clarification would be very helpful from matz....
# 


Same here.

Chad