ri on snow leopard?

M

Matt Neuburg

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:in `node_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:in `load'
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:in `get_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:in `get_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:in `get_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:in `get_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:in `each'
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.
 
E

Eric Hodel

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)

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.
 
M

Matt Neuburg

Eric Hodel said:
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.
 
R

Ryan Davis

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top