ruby rookie needs help with "ri" command

I am a ruby rookie with a question

I am running ruby 2.6.0p0 (2018-12-25 revision 66547) [x64-mingw32]
my laptop is windows 10

I was going through the PDF versionb of a ruby intro book and I have a
question about the "ri" command. The PDF file shows the following examples

ri Array
ri Array.sort
ri Hash#each
ri Math::sqrt

But in each case I receive an error message of the form "Nothing known
about xxx". Why is there no available info on these topics ?

···

==================

Barry Kimelman

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

You have the option at install time to install the documentation (what ri reads from) or not. If your particular Ruby was installed with --no-ri --no-rdoc then there is nothing for it to read from. Personally, I use a desktop documentation reader called Dash (Mac only), and I am sure there are similar utilities available for Windows. There's also the full documentation available at https://ruby-lang.org

And I just found this, which may as well have been written by you :wink:

Walter

···

On Jun 23, 2019, at 5:07 PM, Barry Kimelman <crhistopher.pike@gmail.com> wrote:

I am a ruby rookie with a question

I am running ruby 2.6.0p0 (2018-12-25 revision 66547) [x64-mingw32]
my laptop is windows 10

I was going through the PDF versionb of a ruby intro book and I have a question about the "ri" command. The PDF file shows the following examples

ri Array
ri Array.sort
ri Hash#each
ri Math::sqrt

But in each case I receive an error message of the form "Nothing known about xxx". Why is there no available info on these topics ?

==================

Barry Kimelman

  Virus-free. www.avast.com

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

You have the option at install time to install the documentation (what ri
reads from) or not. If your particular Ruby was installed with --no-ri
--no-rdoc then there is nothing for it to read from. Personally, I use a
desktop documentation reader called Dash (Mac only), and I am sure there
are similar utilities available for Windows. There's also the full
documentation available at https://ruby-lang.org

And I just found this, which may as well have been written by you :wink:

https://stackoverflow.com/questions/3178900/how-do-i-install-the-ruby-ri-documentation

In particular, doubleDown's nailed it for me. I've been struggling (on and
off) with trying to get ri to work properly in Windows for years; I'd never
read his advice to run `rdoc --all --ri` in a Ruby source folder. (I just
saw on another site a suggestion to run that command in the Ruby
installation root directory; I just did it in the toplevel of the Ruby
source, just in case, so I don't know if that will work).

I also followed that with `gem rdoc --all --ri --no-rdoc` to make sure my
currently-installed gems get documented too.

···

On Sun, Jun 23, 2019 at 4:06 PM Walter Lee Davis <waltd@wdstudio.com> wrote:

Walter

> On Jun 23, 2019, at 5:07 PM, Barry Kimelman <crhistopher.pike@gmail.com> > wrote:
>
> I am a ruby rookie with a question
>
> I am running ruby 2.6.0p0 (2018-12-25 revision 66547) [x64-mingw32]
> my laptop is windows 10
>
> I was going through the PDF versionb of a ruby intro book and I have a
question about the "ri" command. The PDF file shows the following examples
>
> ri Array
> ri Array.sort
> ri Hash#each
> ri Math::sqrt
>
> But in each case I receive an error message of the form "Nothing known
about xxx". Why is there no available info on these topics ?
>
> ==================
>
> Barry Kimelman
>
> Virus-free. www.avast.com
>
> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

--
        Eric Christopherson