Why Does My Ruby 'Ri' Tool Not Return Results in Command Prompt

ruby 1.9 ri on Windows knows nothing about any classes

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.

How to get the Ruby documentation from the command line

If you're using RVM to manage your Ruby installations you can do this:

rvm docs generate

If not, try doing this:

gem install rdoc-data
rdoc-data --install

then try the ri command again.

Nothing known about.... when trying ri String#upcase Ruby

Did you generate the docs?

rvm docs generate

https://rvm.io/rubies/docs/

Trying to find a reference to the manual but can't

That's because ri gives you information about methods, and not language syntax. while is Ruby's keyword, just like begin. If you try you won't find anything about begin in ri. Instead you can try ri File::read for example.

How do I get the command output from the Albacore exec task?

You mentioned albacore and you use the task exec. If there is no special need of albacore you may use standard ruby tools:

#Define the command:
cmd = 'dir'
#or in your case:
#cmd ['"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\tf.exe"',
# 'checkout'].join(' ')


#Version one:
output = `#{cmd}`
puts output

#Version two:
output = %x{#{cmd}}
puts output

More solutions may be found at Getting output of system() calls in Ruby



Related Topics



Leave a reply



Submit