tags:

views:

568

answers:

4

hi all, i'm using windows xp sp2, and installed ruby through ruby 1.9 one click installer. then when i try to using ri, i get the following response, can anyone help me with my problem? great thanks.

C:\Documents and Settings\eyang>ruby --version
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

C:\Documents and Settings\eyang>ri --version
ri 2.2.2

C:\Documents and Settings\eyang>ri String
Updating class cache with 0 classes...
Nothing known about String

C:\Documents and Settings\eyang>ri
Updating class cache with 0 classes...
No ri data found

If you've installed Ruby yourself, you need to generate documentation using:

  make install-doc

from the same place you ran `make` to build ruby.

If you installed Ruby from a packaging system, then you may need to
install an additional package, or ask the packager to enable ri generation.

C:\Documents and Settings\eyang>


by the way, when i try to use gem, i got the following error messages too, anyone can explain it ? great thanks.

C:\Documents and Settings\eyang>gem --version
1.3.5

C:\Documents and Settings\eyang>gem query --remote

*** REMOTE GEMS ***

ERROR:  While executing gem ... (Errno::ENOMEM)
    Not enough space - <STDOUT>

C:\Documents and Settings\eyang>
+2  A: 

Hello.

RubyInstaller do not bundle RI documentation, as it increased the size of the distribution and the time to install the package.

Instead, we bundled CHM (Windows Help) files for both Core and StdLib API.

This was discussed in the RubyInstaller group and the decision was made on that base.

As for your other point, two things: you need to provide a gem name or part of it, since there are 12K gems in RubyForge.

Also, depending on your console configuration (Latin or something) the Not Enough space error will be related to the terminal itself, not RubyGems.

Luis Lavena
greate thanks Luis Lavena.
Yousui
A: 

Go to the same folder where your ruby is installed. Then do:

rdoc --all --ri
GregMoreno
what does this do?
Comptrol
A: 
D:\opt\ruby-1.9.1-p378-i386-mingw32>rdoc --all --ri
d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/parser.rb:73:in `each': failed to allocate memory (NoMemoryError
)
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/parser.rb:73:in `grep'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/parser.rb:73:in `binary?'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/parser.rb:90:in `can_parse'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/rdoc.rb:157:in `block in normalized_file_list'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/rdoc.rb:150:in `each'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/rdoc.rb:150:in `normalized_file_list'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/rdoc.rb:185:in `list_files_in_directory'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/rdoc.rb:166:in `block in normalized_file_list'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/rdoc.rb:150:in `each'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/rdoc.rb:150:in `normalized_file_list'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/rdoc.rb:185:in `list_files_in_directory'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/rdoc.rb:166:in `block in normalized_file_list'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/rdoc.rb:150:in `each'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/rdoc.rb:150:in `normalized_file_list'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/rdoc.rb:197:in `parse_files'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/lib/ruby/1.9.1/rdoc/rdoc.rb:257:in `document'
        from d:/opt/ruby-1.9.1-p378-i386-mingw32/bin/rdoc:15:in `<main>'
pmadzik
and now what does this mean at all? your command contains errors.
Comptrol
A: 

rubyinstaller doesn't come with ri for core by default, so install the rdoc-data gem, then it will have it.

rogerdpack