Ri on snow leopard?

Hey all -

As usual after any kind of dramatic change on my computer, ri is
semi-busted after upgrading to Snow Leopard.

Possibly relevant:

$ ri --version
ri v1.0.1 - 20041108

(Seems oddly kind of old.)

Anyhow. Works fine like this:

$ ri --system String

[gorgeous display of results omitted here for brevity]

But:

$ ri String
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/
yaml.rb:133:in transfer': invalid subclass (TypeError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/ yaml.rb:133:innode_import’
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/
yaml.rb:133:in load' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/ yaml.rb:133:inload’
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/
rdoc/ri/ri_descriptions.rb:72:in deserialize' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/ rdoc/ri/ri_reader.rb:54:inget_class’
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/
rdoc/ri/ri_reader.rb:54:in open' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/ rdoc/ri/ri_reader.rb:54:inget_class’
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/
rdoc/ri/ri_reader.rb:52:in each' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/ rdoc/ri/ri_reader.rb:52:inget_class’
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/
rdoc/ri/ri_driver.rb:68:in report_class_stuff' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/ rdoc/ri/ri_driver.rb:104:inget_info_for’
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/
rdoc/ri/ri_driver.rb:133:in process_args' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/ rdoc/ri/ri_driver.rb:132:ineach’
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/
rdoc/ri/ri_driver.rb:132:in `process_args’
from /usr/bin/ri:48

Maybe something crufty left over from earlier? Any suggestions on how to
track it down? The --gems docs seem to be the problem, I think. Thx - m.

On Sep 3, 2009, at 12:00, Matt N. wrote:

Anyhow. Works fine like this:
yaml.rb:133:in `transfer’: invalid subclass (TypeError)
Likely you had RDoc 2 installed then it got replaced by RDoc 1 when
you upgraded.

Try re-installing RDoc 2. RDoc 1 can’t read it’s ri data format.

Eric H. [email protected] wrote:

On Sep 3, 2009, at 12:00, Matt N. wrote:

$ ri String
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/
yaml.rb:133:in `transfer’: invalid subclass (TypeError)

Likely you had RDoc 2 installed then it got replaced by RDoc 1 when
you upgraded.

Try re-installing RDoc 2.

Excellent.

It was very confusing there because when I looked at my gems I had rdoc
2.4.3, but when I actually asked rdoc what its version was, just as you
say, it was 1.0.1. Saying “sudo gem install rdoc” fixed the whole thing.

It was also necessary to delete the home .ri folder because the
permissions were wrong.

After that things seem to be fine.

I’m going on about this at such length because this might help someone
else…!

Thx - m.

On Sep 3, 2009, at 16:20 , Matt N. wrote:

Try re-installing RDoc 2.

Excellent.

(mostly) better imo:

% sudo gem pristine rdoc

once we add the ability for gem install to store off any build flags
you supplied this will be the best way to deal with system upgrades:

% sudo gem pristine --all

But until then things like mysql will blow up.