Hi
I just installed 1.8.2 on OS X. All looks ok so far, but I
did notice that 'ri String' caused an error. But, for what
it's worth, 'ri Array' and 'ri Hash' work.
./ri String
/Users/jdf/local_ruby/ruby-1.8.2/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb:99:in
`concat': cannot convert nil into Array (TypeError)
from
/Users/jdf/local_ruby/ruby-1.8.2/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb:99:in
`merge_in'
from
/Users/jdf/local_ruby/ruby-1.8.2/lib/ruby/1.8/rdoc/ri/ri_reader.rb:56:in
`get_class'
from
/Users/jdf/local_ruby/ruby-1.8.2/lib/ruby/1.8/rdoc/ri/ri_reader.rb:52:in
`each'
from
/Users/jdf/local_ruby/ruby-1.8.2/lib/ruby/1.8/rdoc/ri/ri_reader.rb:52:in
`get_class'
from
/Users/jdf/local_ruby/ruby-1.8.2/lib/ruby/1.8/rdoc/ri/ri_driver.rb:70:in
`report_class_stuff'
from
/Users/jdf/local_ruby/ruby-1.8.2/lib/ruby/1.8/rdoc/ri/ri_driver.rb:106:in
`get_info_for'
from
/Users/jdf/local_ruby/ruby-1.8.2/lib/ruby/1.8/rdoc/ri/ri_driver.rb:135:in
`process_args'
from
/Users/jdf/local_ruby/ruby-1.8.2/lib/ruby/1.8/rdoc/ri/ri_driver.rb:134:in
`each'
from
/Users/jdf/local_ruby/ruby-1.8.2/lib/ruby/1.8/rdoc/ri/ri_driver.rb:134:in
`process_args'
from ./ri:48
···
--
Jim Freeze
Code Red. Code Ruby
Hmm, just to confuse the issue "ri String" works fine on my OS X box with Ruby 1.8.2.
James Edward Gray II
···
On Dec 26, 2004, at 5:27 PM, jim@freeze.org wrote:
Hi
I just installed 1.8.2 on OS X. All looks ok so far, but I
did notice that 'ri String' caused an error. But, for what
it's worth, 'ri Array' and 'ri Hash' work.
Seems to work on my OSX box here. Do you perhaps have an old String description lying around?
···
On Dec 26, 2004, at 5:27 PM, jim@freeze.org wrote:
Hi
I just installed 1.8.2 on OS X. All looks ok so far, but I
did notice that 'ri String' caused an error. But, for what
it's worth, 'ri Array' and 'ri Hash' work.
OK, I just got this same error. ruby 1.8.2 on linux (somewhat updated
FC1). It borks on 'ri Array', Hash, File and probably more. But
things like 'ri Array#hash' work. I've installed ruby by hand in
/usr, and started installing libs (and their docs in --ri-site). For
example, 'ri NArray' works.
I don't think I'm being a dolt (although if I am, please throw me a
bone) cause I've deleted the docs, and recreated them several times.
Specifically:
% rm -r /usr/share/ri/1.8/system
% cd <src>
% rdoc --all --ri-system
Now the weird part. 'ri Array' works while the 'Generating RI...' is
showing, and then borks with the below error msg after the rdoc is
complete.
/usr/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb:99:in `concat': cannot
convert nil into Array (TypeError)
from /usr/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb:99:in `merge_in'
from /usr/lib/ruby/1.8/rdoc/ri/ri_reader.rb:56:in `get_class'
from /usr/lib/ruby/1.8/rdoc/ri/ri_reader.rb:52:in `each'
from /usr/lib/ruby/1.8/rdoc/ri/ri_reader.rb:52:in `get_class'
from /usr/lib/ruby/1.8/rdoc/ri/ri_driver.rb:70:in `report_class_stuff'
from /usr/lib/ruby/1.8/rdoc/ri/ri_driver.rb:106:in `get_info_for'
from /usr/lib/ruby/1.8/rdoc/ri/ri_driver.rb:135:in `process_args'
from /usr/lib/ruby/1.8/rdoc/ri/ri_driver.rb:134:in `each'
from /usr/lib/ruby/1.8/rdoc/ri/ri_driver.rb:134:in `process_args'
from /usr/bin/ri:48
And nope, this was a fresh install. No old libraries around (or other
docs to confuse it). Any other ideas? Thanks in advance.
Cameron
* Dave Thomas <Dave@PragProg.com> [2004-12-27 14:12:47 +0900]:
···
On Dec 26, 2004, at 5:27 PM, jim@freeze.org wrote:
>Hi
>
>I just installed 1.8.2 on OS X. All looks ok so far, but I
>did notice that 'ri String' caused an error. But, for what
>it's worth, 'ri Array' and 'ri Hash' work.
Seems to work on my OSX box here. Do you perhaps have an old String
description lying around?
If I do, it is not in any visible path.
Using the full path to ri still causes the problem.
Maybe the problem occurred when I built the documentation.
How do I completely rebuild the ri docs? I had the
make file build it for me initially.
--
Jim Freeze
Code Red. Code Ruby
To add a little information, I did find a 'File' directory in the
site/ subdir (unrelated to the std file) that was probably installed
via a gem. Renaming this to a new name fixed 'ri File' - so perhaps
there are duplicates.
Is there a way to have this documentation coexist? I really like
having ri available documentation around.
And this doesn't fix everything (at least as far as I can tell),
because Array still doesn't work and I can only find one reference to
it:
% cd /usr/share/ri/
% find . -name 'Array'
./1.8/system/Array
Kick in the head or configuration graciously requested...
Cameron
* jim@freeze.org <jim@freeze.org> [2004-12-28 00:10:04 +0900]:
* Dave Thomas <Dave@PragProg.com> [2004-12-27 14:12:47 +0900]:
>
How do I completely rebuild the ri docs? I had the
make file build it for me initially.
Ok, this is what I tried:
rdoc --all --ri-system <install-dir>
Maybe that should have been
rdoc --all --ri-system <src-dir>
BTW, is it possible to use the ri and rdoc with 1.8.2
on a 1.8.0 install?
···
> On Dec 26, 2004, at 5:27 PM, jim@freeze.org wrote:
--
Jim Freeze
Code Red. Code Ruby
After coming back with a fresher mind, it does seem to be a simple
duplication. If I rename the /usr/share/ri/1.8/site directory, all
works well. (with the exception of the lost site docs)
Unless I'm mistaken, this pretty much means that ri doesn't seem to
handle name clashes that well. When I install gems, I have it
generating does with --ri-site. Apparently, this is the cause of the
breakage and the root of the error msg I'm getting.
Advice on how to make this stuff happily coexist would be most
welcome. Am I naively doing something silly? I think both ri and
gems are fantastic, and I'm sure there has to be a way.
Thanks.
Cameron
The reason it is failing is because the comment
section inside the yaml file is empty.
Looking at cdesc-String.yaml:
cat cdesc-String.yaml
...
class_methods:
- !ruby/object:RI::MethodSummary
name: new
comment:
constants: []
...
Whereas looking at cdesc-Array.yaml
cat cdesc-Array.yaml
...
class_methods:
- !ruby/object:RI::MethodSummary
name: "[]"
- !ruby/object:RI::MethodSummary
name: new
comment:
- !ruby/struct:SM::Flow:
body: "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."
constants: []
...
So, the question is, why didn't the comment section get generated on my machine?
···
--
Jim Freeze
Code Red. Code Ruby
Ok, this is what I tried:
rdoc --all --ri-system <install-dir>
Maybe that should have been
rdoc --all --ri-system <src-dir>
The documentation for built-in classes is in the source for those classes. The source isn't in the instal dirs, so you'll be missing all that fine documentation.
BTW, is it possible to use the ri and rdoc with 1.8.2
on a 1.8.0 install?
I don't know, is the simple answer. It should probably work, as I don't believe it uses anything special.
Cheers
Dave
···
On Dec 27, 2004, at 9:28 AM, jim@freeze.org wrote:
Is the timestamp on that file consistent with all the other files in there? If you delete it, then regenerate the documentation, does it reappear with an empty section?
I've never seen this before, nor can I reproduce it. I'm not sure where to look further
Dave
···
On Dec 27, 2004, at 10:56 AM, jim@freeze.org wrote:
The reason it is failing is because the comment
So, the question is, why didn't the comment section get generated on my machine?
* Dave Thomas <Dave@PragProg.com> [2004-12-28 17:35:11 +0900]:
Is the timestamp on that file consistent with all the other files in
there? If you delete it, then regenerate the documentation, does it
reappear with an empty section?
The timestamp appeared ok, but after I deleted the String directory
and rebuilt the docs, it now works. If I find time to rebuild from scratch
again, I'll see if I can understand what happened originally.
BTW, if you pass a bogus option into rdoc, it doesn't complain.
For example:
rdoc --all -ri-system .
happily creates documentation in ~/.rdoc.
···
--
Jim Freeze
Code Red. Code Ruby
The timestamp appeared ok, but after I deleted the String directory
and rebuilt the docs, it now works. If I find time to rebuild from scratch
again, I'll see if I can understand what happened originally.
Sounds like there was simply a spurious file lying around. Glad it's working OK for you now.
BTW, if you pass a bogus option into rdoc, it doesn't complain.
For example:
rdoc --all -ri-system .
That's because there isn't a spurious option there... it's just the way this style of option passing works. You told it
--all
-r
-i -system
It's a feature of getoptlong.
Cheers
Dave
···
On Dec 28, 2004, at 12:16 PM, jim@freeze.org wrote: