How to get ri/rdoc working for 1.8.1 on Windows?

Slightly unrelated, but please read
http://rubyforge.org/pipermail/rubygems-developers/2004-March/000226.html

PS: when I implemented the autogen. of ri datafiles for RPA, I had to
patch ri (which is no problem since it’s available as a port so
rpa install ri-rpa gets all the magic done).

···

On Thu, Apr 22, 2004 at 11:11:11AM +0900, Dave Thomas wrote:

On Apr 21, 2004, at 17:56, Gavin Sinclair wrote:

If you install a package as a gem, you can get the RDoc installed.
Then you can view it. Example:

Download and install log4r, latest version.

$ gem -i log4r --gen-rdoc

Run documentation browser.

$ gem_server

Now open your browser to http://localhost:8808 and you will see

your installed gems and can view their RDoc output.

It doesn’t answer your question directly, but I hope it gives you a
taste of the future :slight_smile:

Does it also install it so ‘ri’ works? If not, can this be added?


Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

How do I type “for i in *.dvi do xdvi $i done” in a GUI?
– Discussion in comp.os.linux.misc on the intuitiveness of interfaces

If you install a package as a gem, you can get the RDoc installed.
Then you can view it. Example:

Download and install log4r, latest version.

$ gem -i log4r --gen-rdoc

Run documentation browser.

$ gem_server

Now open your browser to http://localhost:8808 and you will see

your installed gems and can view their RDoc output.

It doesn’t answer your question directly, but I hope it gives you a
taste of the future :slight_smile:

[Dave:] Does it also install it so ‘ri’ works? If not, can this be added?

That’s definitely in our TODO. We haven’t fleshed it out, but I believe a
sensible system would require a change to ri. If you have 100 gems
installed, and run ‘ri --classes’, I’m sure you don’t want to see 1000
classes.

So a more sensible use case (IMO) is:

ri --gem log4r # Shows all relevant classes
ri --gem log4r Log4r # Searches class/method within log4r space

ri --search to_i # Global search

I haven’t thought it out much, and don’t have time now, but the basic
point is that ri needs to treat RubyGems a bit specially.

Consider this also. When you uninstall a gem, it should remove the ri
data. Basically, the ri data for a gem should be installed in that gem’s
directory, like:

gems/log4r/doc/rdoc # exists
gems/log4r/doc/ri # doesn’t exist

Also, you can have multiple versions of a gem installed, and ri needs to
handle that without overwheling the user.

All of this is definitely doable, but it needs your input, Dave.

Cheers,
Gavin

···

On Apr 21, 2004, at 17:56, Gavin Sinclair wrote:

“Dave Thomas” dave@pragprog.com wrote in

frustrating for us all: I’m proud of RDoc/ri,

I know it will be an indispensible tool (for me), so many thanks for that.

I’d like to see it “just work.”

That would be great. (I was just reporting, not complaining.)

Running it against lib/ really isn’t the answer.

Good point.

But there are so many useful libraries available outside the 1.8 set, many
not rdoc’d. Some recommended approach to using rdoc/ri on these would be
helpful, even with some compromises. Heck, if it looked like I would use a
library often enough I should be willing to write a .document file for Rdoc
to make my own life easier.

Cheers

A lot of this seems somewhat muddy to me as well.

In my case, the thing I was missing was that the Windows installer doesn’t
include the Ruby source and as a result running rdoc won’t have the desired
effect. D’oh!

Here’s what I know:

  1. Our process for building the ruby installer for windows does run rdoc
    to create the ri database. Unfortunately, it turns out those files didn’t
    get copied into the installer. I zipped up these files so you can download
    them here:

    http://curthibbs.us/share.zip

Unzip this into your ruby install dir (you should then have a “share”
subdirectory in your ruby install dir).

Nice.

  1. rdoc.bat in the bin directory has 4 bad paths in them (all near the top
    of the file). You don’t need to delete his batch file, just change the paths
    to your ruby install dir (“c:\ruby” by default).

  2. “rdoc” and “ri” in the bin directory are missing their “.rb”
    extensions – simply rename them.

Okay. 2) and 3) I found, fixed and reported earlier on this list, as did
others. Next time I’ll use the RubyForge bugreporting system.

When I do these three things, I can run rdoc and ri without any problems.
Let me know if this works for you.

Will do tomorrow at work. Thanks Curt!

···

On Thu, Apr 22, 2004 at 01:03:36PM +0900, Curt Hibbs wrote:

Curt


Jos Backus / /// Sunnyvale, CA
_/ _/ _/
/ ///
_/ _/ _/ /
jos at catnook.com // //
/ require ‘std/disclaimer’

That’s definitely in our TODO. We haven’t fleshed it out, but I
believe a
sensible system would require a change to ri. If you have 100 gems
installed, and run ‘ri --classes’, I’m sure you don’t want to see 1000
classes.

Why not?

So a more sensible use case (IMO) is:

ri --gem log4r # Shows all relevant classes
ri --gem log4r Log4r # Searches class/method within log4r space

ri --search to_i # Global search

I’m afraid I disagree 100% with this. gems are ways of getting code
into the box, but in their users’ minds that’s it. The approach you’re
suggesting is equivalent to

man -k --installed-via-rpm xxx
man -k --installed-manually xxx
etc

Consider this also. When you uninstall a gem, it should remove the ri
data. Basically, the ri data for a gem should be installed in that
gem’s
directory, like:

gems/log4r/doc/rdoc # exists
gems/log4r/doc/ri # doesn’t exist

Why? Don’t gems keep track of the files they’ve altered during
installation, and remove those that were altered but not already there
on uninstall? I don’t see why anything needs to know about gems apart
from gems?

All of this is definitely doable, but it needs your input, Dave.

I’d be happy to make any reasonable changes (I’ll look at the
reentrancy issue batsman raised, for example). But I’m not convinced at
all that ri (or any other utility) should be gems aware. It they need
to be, then I’m currently thinking that that means the gems system
could be more transparent.

Cheers

Dave

···

On Apr 22, 2004, at 3:03, Gavin Sinclair wrote:

That’s definitely in our TODO. We haven’t fleshed it out, but I
believe a
sensible system would require a change to ri. If you have 100 gems
installed, and run ‘ri --classes’, I’m sure you don’t want to see 1000
classes.

Why not?

Because it’s too much information to realistically browse. And it
would be too slow. It takes about 2s for ri to show me all my classes
now, and that’s just core and (partial) stdlib. That’s already close
to too much. Doing any query takes at least as long.

There’s only one existing documentation context where I think it’s helpful
to look through 1000 entries: an index. ri has a good index, but not
a table of contents. It has no current way to show you what packages
you can browse. I think that’s an important thing to address as the
documentation base gets bigger, and I don’t see a good way to do that
except for integrating somewhat with gems. Not in such a way as to
alienate non-gems users; far from it.

If you have an alternative idea for introducing categorisation to ri
output, I’d like to hear it. If you don’t think it’s important;
that’s OK too, since RDoc HTML combined with gem server fulfils the
“table of contents” aspect.

So a more sensible use case (IMO) is:

ri --gem log4r # Shows all relevant classes
ri --gem log4r Log4r # Searches class/method within log4r space

ri --search to_i # Global search

I’m afraid I disagree 100% with this. gems are ways of getting code
into the box, but in their users’ minds that’s it. The approach you’re
suggesting is equivalent to

man -k --installed-via-rpm xxx
man -k --installed-manually xxx
etc

Would you think differently if gems were the one and only way people
installed Ruby libs and apps? Of course that’s not true now, but I
think it will be in a few years. I may be wrong and/or unconvincing,
but at least you know where I’m coming from.

Even before gems are ubiquitous, I expect RubyGems will be a standard
Ruby component, as is ri. In that scenario, it’s not unreasonable for
them to share some knowledge for the benefit of the user.

And as my hasty use case above didn’t make clear, I had no intention
of deprecating current ri functionality. It’s just an optimisation,
and the user need never type --gem if they don’t want to.

I suppose it’s possible to approach this the other way: one could write
an ri clone that bridges the gap, using both the ri and rubygems
libraries. That’s architecturally cleaner, I suppose.

Consider this also. When you uninstall a gem, it should remove the ri
data. Basically, the ri data for a gem should be installed in that
gem’s
directory, like:

gems/log4r/doc/rdoc # exists
gems/log4r/doc/ri # doesn’t exist

Why? Don’t gems keep track of the files they’ve altered during
installation, and remove those that were altered but not already there
on uninstall? I don’t see why anything needs to know about gems apart
from gems?

No it doesn’t. It knows that everything it’s installed is in certain
directories, and wipes those directories. There are one or two small
exceptions. The approach I outlined above (gem has its own ri
directory) is wholly consistent with the gems approach.

All of this is definitely doable, but it needs your input, Dave.

I’d be happy to make any reasonable changes (I’ll look at the
reentrancy issue batsman raised, for example). But I’m not convinced at
all that ri (or any other utility) should be gems aware. It they need
to be, then I’m currently thinking that that means the gems system
could be more transparent.

For better or for worse, gems will never be very transparent. It’s
impossible to support multiple versions of the same library installed
simulataneously without taking a different approach to the traditional
Unix and Ruby “shotgun over the filesystem” approach.

“More transparent”? Possible, yes. We’re discussing some
transparency aspects on the list now. But here’s a good litmus test
question: do you think that ri should handle the fact that multiple
versions of the same library are installed and have documentation? If
so, how can ri support this without grokking gems? If not, which
version gets used for documentation? (Answer, I expect: the one
installed most recently.)

Clarification: my proposed target dir for a gem’s ri data was
inaccurate. The example above should be more like this:

$ruby/gems/1.8/gems/copland-0.2/rdoc
$ruby/gems/1.8/gems/copland-0.2/ri
$ruby/gems/1.8/gems/copland-0.3/rdoc
$ruby/gems/1.8/gems/copland-0.3/ri

($ruby == /usr/local/lib/ruby, for instance)

Cheers,
Gavin

···

On Thursday, April 22, 2004, 11:22:14 PM, Dave wrote:

On Apr 22, 2004, at 3:03, Gavin Sinclair wrote:

Wrote Dave Thomas dave@pragprog.com, on Thu, Apr 22, 2004 at 10:22:14PM +0900:

That’s definitely in our TODO. We haven’t fleshed it out, but I
believe a
sensible system would require a change to ri. If you have 100 gems
installed, and run ‘ri --classes’, I’m sure you don’t want to see 1000
classes.

Why not?

I agree, if you ask for --classes, you should see all classes.

So a more sensible use case (IMO) is:

ri --gem log4r # Shows all relevant classes
ri --gem log4r Log4r # Searches class/method within log4r space

ri --search to_i # Global search

But, if you don’t want to see all classes, you should have a way to
limit, but by gem doesn’t make much sense to me. If I wanted to browse
only in a particular package, I would be looking at the rdoc output for
that package.

I think being able to limit ri by module/ruby namespace would be interesting, so

ri --classes Logger

would show you all the classes in Logger. Maybe even ri --classes nil
would show you all top-level classes. Probably this wouldn’t be the
–classes option, it maybe would have to be different.

I’m afraid I disagree 100% with this. gems are ways of getting code
into the box, but in their users’ minds that’s it.

In this user’s mind that should true, but it isn’t now.

There’s currently a little wrinkle - they aren’t just a way of getting
code into the box, any user of a gem has to know it got into the box as
a gem, and change their

require ‘package’

to

require_gem ‘package’

Coincidentally, I’ve been chatting with Gavin about this over email, he
suggested that it might be possible to get the “traditional” ruby
require to work with gems.

Cheers,
Sam

···

On Apr 22, 2004, at 3:03, Gavin Sinclair wrote:


Sam Roberts sroberts@certicom.com

The problem is that Rubygems only manages files in a hidden ‘gemdir’
(like lib/ruby/gems/1.8/somegem), by design, and is unable to install
stuff in $datadir/ri as required by the mainstream ri.

···

On Thu, Apr 22, 2004 at 10:22:14PM +0900, Dave Thomas wrote:

Consider this also. When you uninstall a gem, it should remove the ri
data. Basically, the ri data for a gem should be installed in that
gem’s
directory, like:

gems/log4r/doc/rdoc # exists
gems/log4r/doc/ri # doesn’t exist

Why? Don’t gems keep track of the files they’ve altered during
installation, and remove those that were altered but not already there
on uninstall? I don’t see why anything needs to know about gems apart
from gems?


Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

People are going to scream bloody murder about that.
– Seen on linux-kernel

Jos Backus wrote:

···

On Thu, Apr 22, 2004 at 01:03:36PM +0900, Curt Hibbs wrote:

  1. rdoc.bat in the bin directory has 4 bad paths in them (all near the top
    of the file). You don’t need to delete his batch file, just change the paths
    to your ruby install dir (“c:\ruby” by default).
  1. “rdoc” and “ri” in the bin directory are missing their “.rb”
    extensions – simply rename them.

But once you’ve done 3, the bat file is useless anyway. Same with
testrb, irb, ri, and erb. Rename 'em *.rb and throw the *.bat away.

For the rest, yes, this has ri working again. Yaaaayyyyyyy


John W. Kennedy
Read the remains of Shakespeare’s lost play, now annotated!
http://pws.prserv.net/jwkennedy/Double%20Falshood.html

Here’s what I know:

  1. Our process for building the ruby installer for windows does run rdoc
    to create the ri database. Unfortunately, it turns out those files didn’t
    get copied into the installer. I zipped up these files so you can download
    them here:

    http://curthibbs.us/share.zip

Unzip this into your ruby install dir (you should then have a “share”
subdirectory in your ruby install dir).

Check.

  1. rdoc.bat in the bin directory has 4 bad paths in them (all near the top
    of the file). You don’t need to delete his batch file, just change the paths
    to your ruby install dir (“c:\ruby” by default).

  2. “rdoc” and “ri” in the bin directory are missing their “.rb”
    extensions – simply rename them.

Check.

Okay. 2) and 3) I found, fixed and reported earlier on this list, as did
others. Next time I’ll use the RubyForge bugreporting system.

When I do these three things, I can run rdoc and ri without any problems.
Let me know if this works for you.

C:\Ruby\bin>ruby ri.rb Array
---------------------------------------------------------- Module: Array
Arrays are ordered, integer-indexed collections of any object.
Array indexing starts at 0, as in C or Java. A negative index is
assumed to be relative to the end of the array—that is, an index
of -1 indicates the last element of the array, -2 is the next to
last element in the array, and so on.

···

On Thu, Apr 22, 2004 at 01:26:13PM +0900, Jos Backus wrote:

On Thu, Apr 22, 2004 at 01:03:36PM +0900, Curt Hibbs wrote:


C:\Ruby\bin>ruby ri.rb Array.push
Nothing known about Array.push


Jos Backus / /// Sunnyvale, CA
_/ _/ _/
/ ///
_/ _/ _/ /
jos at catnook.com // //
/ require ‘std/disclaimer’

sensible system would require a change to ri. If you have 100 gems
installed, and run ‘ri --classes’, I’m sure you don’t want to see
1000
classes.

Why not?

Because it’s too much information to realistically browse. And it
would be too slow. It takes about 2s for ri to show me all my classes
now, and that’s just core and (partial) stdlib. That’s already close
to too much. Doing any query takes at least as long.

Speeds a separate issue: ri and rdoc are implemented via a cache layer
(ri_cache), but I haven’t implemented it yet. Once that’s done, you’ll
find that queries are a lot, lot faster.

You say it’s too much information, but I dislike making policy decision
on behalf of users. If they ask for a full class listing, then I’ll
give them one. If they want everything to do with X, then they can ask
for that. The opposite, where they have to know where stuff comes from,
seems to getr in the way.

If you have an alternative idea for introducing categorisation to ri
output, I’d like to hear it. If you don’t think it’s important;
that’s OK too, since RDoc HTML combined with gem server fulfils the
“table of contents” aspect.

Personally, I’d add a Catgegory: xxx markup to the files, and then
build an index based on it.

Here’s a stake in the ground. I like gems, and I support the idea. I’ll
be writing a gems appendix for the new pickaxe. At the same time, I am
not going to tie RDoc/ri to gems: packaging scheme have proven to be
ephemeral in the past.

Would you think differently if gems were the one and only way people
installed Ruby libs and apps?

I’d think differently if

  1. gems were built in to Ruby. The test for this is that there’d be no
    more lib and ext directories, and the stuff needed to run gems was
    built-in. If that were the case, gems would be the universal mechanism,
    and Ruby would be distinguished as one of the few languages to
    integrate package management.

  2. the gem directory structure, versioning, and naming conventions were
    universally adopted and understood

  3. We understood better exactly how people use gems.

I suppose it’s possible to approach this the other way: one could write
an ri clone that bridges the gap, using both the ri and rubygems
libraries. That’s architecturally cleaner, I suppose.

I think all you need is a simple wrapper that invokes ri with the
appropriate options: there’s no need to clone it.

“More transparent”? Possible, yes. We’re discussing some
transparency aspects on the list now. But here’s a good litmus test
question: do you think that ri should handle the fact that multiple
versions of the same library are installed and have documentation?

No, I don’t think this is a priority. ri is a developer tool, not an
end-user tool. Multiple versions of the libraries are (transparently)
significant to end users, but developers are probably interested
primarily in the current version’s documentation.

Versioning is a good example of somewhere where gems has a solution,
but I’m not sure of the problem. While it’s good in theory to have
multiple verions of every library, I’m not sure that in practice its a
need I’ve ever had (and I’m a fairly active Ruby developer :slight_smile:

Instead, I have versions ties to the version of the interpreter: on by
current box, I have four interpreter trees, each with their
then-current versions of libraries. If I run a different version of the
interpreter, I get that interpreter’s versions of the libraries.

Now I know that I’m probably just being curmudgeonly about this, but
I’m one of those people who need to experience the need before
expending a bunch of energy writing the code. In this case, I’m not
sure about the versioning scheme in general, and then who the
interaction between user categories, versions, and documentation takes
place. I’d rather not code into that vacuum. Let’s get some practice
experience first, and then take a position.

Cheers

Dave

···

On Apr 22, 2004, at 10:22, Gavin Sinclair wrote:

John W. Kennedy wrote:

Jos Backus wrote:

  1. rdoc.bat in the bin directory has 4 bad paths in them (all
    near the top
    of the file). You don’t need to delete his batch file, just
    change the paths
    to your ruby install dir (“c:\ruby” by default).
  1. “rdoc” and “ri” in the bin directory are missing their “.rb”
    extensions – simply rename them.

But once you’ve done 3, the bat file is useless anyway. Same with
testrb, irb, ri, and erb. Rename 'em *.rb and throw the *.bat away.

The bat files are a convenience so you can simply type “rdoc ” instead
of “ruby rdoc.rb ”.

For the rest, yes, this has ri working again.
Yaaaayyyyyyy

Great!

Curt

···

On Thu, Apr 22, 2004 at 01:03:36PM +0900, Curt Hibbs wrote:

I’m not sure about older Windows versions, but once the .rb file type is
registered (using the ftype command or by the installer) you can just run
foo.rb' by typing foo’. In that case the .bat files are redundant.

···

On Fri, Apr 23, 2004 at 02:11:01AM +0900, Curt Hibbs wrote:

John W. Kennedy wrote:

But once you’ve done 3, the bat file is useless anyway. Same with
testrb, irb, ri, and erb. Rename 'em *.rb and throw the *.bat away.

The bat files are a convenience so you can simply type “rdoc ” instead
of “ruby rdoc.rb ”.


Jos Backus / /// Sunnyvale, CA
_/ _/ _/
/ ///
_/ _/ _/ /
jos at catnook.com // //
/ require ‘std/disclaimer’

sensible system would require a change to ri. If you have 100 gems
installed, and run ‘ri --classes’, I’m sure you don’t want to see
1000
classes.

Why not?

Because it’s too much information to realistically browse. And it
would be too slow. It takes about 2s for ri to show me all my classes
now, and that’s just core and (partial) stdlib. That’s already close
to too much. Doing any query takes at least as long.

Speeds a separate issue: ri and rdoc are implemented via a cache layer
(ri_cache), but I haven’t implemented it yet. Once that’s done, you’ll
find that queries are a lot, lot faster.

You say it’s too much information, but I dislike making policy decision
on behalf of users. If they ask for a full class listing, then I’ll
give them one. If they want everything to do with X, then they can ask
for that. The opposite, where they have to know where stuff comes from,
seems to getr in the way.

Agreed. Sorry, once again, I didn’t make it clear that I wouldn’t
want to see existing functionality change. So ‘ri -c’ would still
give you pages of stuff. That’s especially unclear above.

Would you think differently if gems were the one and only way people
installed Ruby libs and apps?

I’d think differently if

  1. gems were built in to Ruby. The test for this is that there’d be no
    more lib and ext directories, and the stuff needed to run gems was
    built-in. If that were the case, gems would be the universal mechanism,
    and Ruby would be distinguished as one of the few languages to
    integrate package management.

I don’t think lib and ext directories would go away. Some of the
stuff in libs could be more usefully be distributed as gems, but for
the “core” of the stdlib, it’s important to have it all in CVS. So
future code might look like this:

require ‘singleton’
require_gem ‘rexml’

Maybe in the future, require_gem will be phased out and require made
to understand gems.

  1. the gem directory structure, versioning, and naming conventions were
    universally adopted and understood

Clearly, although you can always “require ‘rubygems’” and use the
interface methods to get a list of all gems, etc., etc.

  1. We understood better exactly how people use gems.

“More transparent”? Possible, yes. We’re discussing some
transparency aspects on the list now. But here’s a good litmus test
question: do you think that ri should handle the fact that multiple
versions of the same library are installed and have documentation?

No, I don’t think this is a priority. ri is a developer tool, not an
end-user tool. Multiple versions of the libraries are (transparently)
significant to end users, but developers are probably interested
primarily in the current version’s documentation.

That’s a policy decision on behalf of users. Not that I necessarily
disagree. I suppose ri should be limited in scope as it is
(obviously) limited in interface.

Even so, to get the latest version’s doc, you need to understand the
gems library structure.

Versioning is a good example of somewhere where gems has a solution,
but I’m not sure of the problem. While it’s good in theory to have
multiple verions of every library, I’m not sure that in practice its a
need I’ve ever had (and I’m a fairly active Ruby developer :slight_smile:

Me neither, but then I’ve never combined a lot of libraries into a
single project. I’ve certainly seen it mentioned a few times on the
list.

Versioning is something that will take a long time to take hold,
because you need to write code like “require_gem ‘log4r’, ‘> 1.0.5’”.

Maybe it never will, but the structure of each package installed in
its own area, and including version number, is sound, I believe. And
the beauty of it is that it’s “backwards compatible”, in that
require_gem will by default select the latest available version. And
‘require’ will work with gems as well (via a stub in site_ruby/1.x
that loads the gem).

Instead, I have versions ties to the version of the interpreter: on by
current box, I have four interpreter trees, each with their
then-current versions of libraries. If I run a different version of the
interpreter, I get that interpreter’s versions of the libraries.

That’s a lot of manual effort, by the sound of it.

Now I know that I’m probably just being curmudgeonly about this, but
I’m one of those people who need to experience the need before
expending a bunch of energy writing the code. In this case, I’m not
sure about the versioning scheme in general, and then who the
interaction between user categories, versions, and documentation takes
place. I’d rather not code into that vacuum. Let’s get some practice
experience first, and then take a position.

Fair enough. It will take some getting used to.

Cheers,
Gavin

P.S. We still don’t know what approach to take to get ri data
installed when you install a gem :slight_smile:

···

On Friday, April 23, 2004, 2:25:54 AM, Dave wrote:

On Apr 22, 2004, at 10:22, Gavin Sinclair wrote:

Jos Backus wrote:

John W. Kennedy wrote:

But once you’ve done 3, the bat file is useless anyway. Same with
testrb, irb, ri, and erb. Rename 'em *.rb and throw the *.bat away.

The bat files are a convenience so you can simply type “rdoc
” instead
of “ruby rdoc.rb ”.

I’m not sure about older Windows versions, but once the .rb file type is
registered (using the ftype command or by the installer) you can just run
foo.rb' by typing foo’. In that case the .bat files are redundant.

And .rb is registered, so you are correct, you could just type “rdoc” and it
woudl work without the batch file. Like you, I’m not sure about Windows 98,
I’ll have to test it.

Curt

···

On Fri, Apr 23, 2004 at 02:11:01AM +0900, Curt Hibbs wrote:

  1. Presumably the gems stuff stored somewhere the list of all installed
    gems. Thus you know where to find gem documentation.

  2. Write a wrapper “rig” which invokes ‘ri’ with the appropriate -d
    option if you’re getting the documentation for a gem.

    rig --gem rexml --version 3.4  <args>
    

    => ri -d /usr/local/gems/rexml/3.4/ri/…

  3. Bask in the glory

  4. If, after a while, this is clearly the way to go, I’ll fold it all
    into ri/rdoc.

Cheers

Dave

···

On Apr 22, 2004, at 17:58, Gavin Sinclair wrote:

P.S. We still don’t know what approach to take to get ri data
installed when you install a gem :slight_smile:

Me neither, but then I’ve never combined a lot of libraries into a
single project. I’ve certainly seen it mentioned a few times on the
list.

To my agile ears, that would suggest it is therefore premature for you
to be working out a versioning system. Perhaps the best designs and
systems come from solving a need, rather than thinking about what a
need might be. I know I’m sounding negative here: I’m not, though. I
really want gems to succeed. We need it. I just feel that part of the
success comes from keeping it light until it has to become heavier.

Instead, I have versions ties to the version of the interpreter: on by
current box, I have four interpreter trees, each with their
then-current versions of libraries. If I run a different version of
the
interpreter, I get that interpreter’s versions of the libraries.

That’s a lot of manual effort, by the sound of it.

Not really, but even if it was, it’d be necessary: I’m supporting code
for all platforms.

Cheers

Dave

···

On Apr 22, 2004, at 17:58, Gavin Sinclair wrote:

Curt Hibbs wrote:

And .rb is registered, so you are correct, you could just type “rdoc” and it
woudl work without the batch file. Like you, I’m not sure about Windows 98,
I’ll have to test it.

I know this doesn’t work on Win 95 – you’ve still got to say “ruby
thing.rb” – dunno 98/Me.

···


Chris
http://clabs.org

[> = “Dave”]

P.S. We still don’t know what approach to take to get ri data
installed when you install a gem :slight_smile:

  1. Presumably the gems stuff stored somewhere the list of all installed
    gems. Thus you know where to find gem documentation.

  2. Write a wrapper “rig” which invokes ‘ri’ with the appropriate -d
    option if you’re getting the documentation for a gem.

    rig --gem rexml --version 3.4  <args>
    

    => ri -d /usr/local/gems/rexml/3.4/ri/…

  3. Bask in the glory

  4. If, after a while, this is clearly the way to go, I’ll fold it all
    into ri/rdoc.

Very good idea and approach, I think. I expect we can distribute ‘rig’
with rubygems in about a month’s time if the other developers agree.

I think “a while” will prove to be quite a long time, and rightly so.

Thanks,
Gavin

Me neither, but then I’ve never combined a lot of libraries into a
single project. I’ve certainly seen it mentioned a few times on the
list.

To my agile ears, that would suggest it is therefore premature for you
to be working out a versioning system. Perhaps the best designs and
systems come from solving a need, rather than thinking about what a
need might be. I know I’m sounding negative here: I’m not, though. I
really want gems to succeed. We need it. I just feel that part of the
success comes from keeping it light until it has to become heavier.

I disclaim any valuable opinion on versioning :slight_smile: Chad and Rich are
(probably) the right folks to discuss that.

My take on the whole thing is this: the best general architecture for gems
is sandboxing, for ease of management. An agile approach is evident,
because that architecture has enabled nice features: gem_server being a
good documentation browser, for instance.

Support for versioning is easy, based on that architecture. There’s no
reason not to do it, because it’s backwards-compatible, and there’s only
one real way to do it [1], so we’re not going down a path we’ll regret.
I hope it’s rarely used: I hope that most libraries support the latest
version of their dependent libraries most of the time, and don’t need to
limit themselves.

But I think it’s easy to argue for versioning in theory as well. We’ll
see how the practice turns out, but my main point is that it’s not a major
distraction; it’s a simple consequence of a good approach. Others in the
development team will probably see it differently :slight_smile:

RubyGems is improving so fast it’s almost scary, so it’s obviously well
grounded in some sense.

Cheers,
Gavin

[1] UI considerations for versioning is definitely something that could
need some work, but I think the fundamental approach is sound.

···

On Apr 22, 2004, at 17:58, Gavin Sinclair wrote: