# Gem/rdoc/ri errors on mingw

**URL:** <https://www.ruby-forum.com/t/gem-rdoc-ri-errors-on-mingw/53846>\
**Category:** Ruby\
**Created:** [February 15, 2006, 8:18am UTC](https://www.ruby-forum.com/t/gem-rdoc-ri-errors-on-mingw/53846 "2006-02-15T08:18:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![combas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/aca169/32.png) [@combas](https://www.ruby-forum.com/u/combas)\
**Post date:** [February 15, 2006, 8:18am UTC](https://www.ruby-forum.com/t/gem-rdoc-ri-errors-on-mingw/53846/1 "2006-02-15T08:18:49Z")

</div>

Hello,  
yesterday I switched from the very good, perfectly functional  
one-click installer to a build-it-yourself-ruby-compile on winXP  
with the mingw environment.

All went very smoothly.  
Great documents on setting up mingw/msys here  
[http://mingw.org/MinGWiki/index.php/RealDumbQuickstart?PHPSESSID=0691a1dc17253ae9792187c3b78816ad](http://mingw.org/MinGWiki/index.php/RealDumbQuickstart?PHPSESSID=0691a1dc17253ae9792187c3b78816ad)

and Great documents on building ruby on windows here

> **[WebMD - Better information. Better health.](https://www.webmd.com/?HowToBuildOnWindows)**
>
> The leading source for trustworthy and timely health and medical news and information. Providing credible health information, supportive community, and educational services by blending award-winning expertise in content, community services, expert...

Follow this up, by getting ruby-gnome2 setup with this wonderful doc  
[http://ruby-gnome2.sourceforge.jp/hiki.cgi?Install+Guide+for+Windows](http://ruby-gnome2.sourceforge.jp/hiki.cgi?Install+Guide+for+Windows)

Mingw works! Ruby works! Ruby-Gnome works!

…rdoc doesnt work… ri doesnt work… gem doesnt either… big uhohs!!

Here is some output:

$\> ruby -v  
ruby 1.8.4 (2006-02-14) [i386-mingw32]  
$\>cd /c/ruby/build/ruby  
$\> make install-doc  
Generating RDoc documentation  
./miniruby.exe ./runruby.rb --extout=.ext – “./bin/rdoc” --all --ri  
–op “C:/ruby/share/ri/1.8/system” “.”  
c:/ruby/build/ruby/lib/tracer.rb:27:in `(null)': undefined method `[]’  
for nil:NilClass (NoMethodError)  
from c:/ruby/build/ruby/lib/rdoc/parsers/parse\_rb.rb:16:in  
`(null)' from c:/ruby/build/ruby/lib/rdoc/rdoc.rb:8:in `(null)’  
from ./bin/rdoc:59  
make: \*\*\* [do-install-doc] Error 1  
$\> gem  
sh: gem: command not found  
$\> rdoc  
c:/ruby/lib/ruby/1.8/tracer.rb:27:in `(null)': undefined method `[]’  
for nil:NilClass (NoMethodError)  
from c:/ruby/lib/ruby/1.8/rdoc/parsers/parse\_rb.rb:16:in  
`(null)' from c:/ruby/lib/ruby/1.8/rdoc/rdoc.rb:8:in `(null)’  
from c:/ruby/bin/rdoc:59  
$\> ri

## Installing Documentation

‘ri’ uses a database of documentation built by the RDoc utility.

So, how do you install this documentation on your system? It depends on  
how you installed Ruby.

_If you installed Ruby from source files_ (that is, if it some point you  
typed ‘make’ during the process :), you can install the RDoc  
documentation yourself. Just go back to the place where you have your  
Ruby source and type

make install-doc

You’ll probably need to do this as a superuser, as the documentation is  
installed in the Ruby target tree (normally somewhere under  
+/usr/local+.

_If you installed Ruby from a binary distribution_ (perhaps using a  
one-click installer, or using some other packaging system), then the  
team that produced the package probably forgot to package the  
documentation as well. Contact them, and see if they can add it to the  
next release.

No ri documentation found in:

Was rdoc run to create documentation?  
$\>

Anyone know how to properly setup a ruby compile so that gem/ri/rdoc  
will work as expected? Anyone have a clue why ‘make install-doc’ fails?

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![combas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/aca169/32.png) [@combas](https://www.ruby-forum.com/u/combas)\
**Post date:** [February 15, 2006, 8:33am UTC](https://www.ruby-forum.com/t/gem-rdoc-ri-errors-on-mingw/53846/2 "2006-02-15T08:33:53Z")

</div>

Alex C. schrieb:

> $\> gem  
> sh: gem: command not found

This is what I call (ruby one-click-installer on Windows):

1. In my path there is an entry for c:\ruby\bin

2. In my ruby\bin directory, there is a file called gem.bat (this one is  
started by windows if you type gem)

3. This gem file contains one beautiful line  
“c:\ruby\bin\ruby.exe” “c:\ruby\bin\gem” %1 %2 %3 %4 %5 %6 %7 %8 %9

So my guess is, make sure you have the gem ruby file installed (get it  
from rubyforge? I doesn’t exactly know where to download gem as I use  
the one-click-stuff) and create this batch file.

HTH,

---

<div class="post-metadata">

**Author:** ![combas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/aca169/32.png) [@combas](https://www.ruby-forum.com/u/combas)\
**Post date:** [February 15, 2006, 1:26pm UTC](https://www.ruby-forum.com/t/gem-rdoc-ri-errors-on-mingw/53846/3 "2006-02-15T13:26:54Z")

</div>

Alex C. wrote:  
[…]

> Anyone know how to properly setup a ruby compile so that gem/ri/rdoc  
> will work as expected? Anyone have a clue why ‘make install-doc’ fails?
> 
> Thanks for any help.

[http://docs.rubygems.org/read/chapter/3](http://docs.rubygems.org/read/chapter/3) should help with RubyGems.

---

<div class="post-metadata">

**Author:** ![combas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/aca169/32.png) [@combas](https://www.ruby-forum.com/u/combas)\
**Post date:** [February 15, 2006, 8:06pm UTC](https://www.ruby-forum.com/t/gem-rdoc-ri-errors-on-mingw/53846/4 "2006-02-15T20:06:17Z")

</div>

On 2/14/06, Daniel VÃ¶lkerts [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 1. This gem file contains one beautiful line  
> “c:\ruby\bin\ruby.exe” “c:\ruby\bin\gem” %1 %2 %3 %4 %5 %6 %7 %8 %9
> 
> So my guess is, make sure you have the gem ruby file installed (get it  
> from rubyforge? I doesn’t exactly know where to download gem as I use  
> the one-click-stuff) and create this batch file.

Thank Daniel,  
Yeah I was using the one-click installer which was  
really nice, but I figured it would be good to have ruby  
built from scratch however it seems there are some hidden gotchas.

I’ll post back if I figure out why make-doc isnt working.

---

<div class="post-metadata">

**Author:** ![combas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/aca169/32.png) [@combas](https://www.ruby-forum.com/u/combas)\
**Post date:** [February 15, 2006, 5:55pm UTC](https://www.ruby-forum.com/t/gem-rdoc-ri-errors-on-mingw/53846/5 "2006-02-15T17:55:36Z")

</div>

On 2/15/06, Jim W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> [http://docs.rubygems.org/read/chapter/3](http://docs.rubygems.org/read/chapter/3) should help with RubyGems.

Thanks Jim, installed gem from ruby forge. Boy, that was easy.

Any clues about rdoc and ri?  
Still no worky.

I wonder if documentation is really nessisary though? Sure its nice, but  
is there any difference between having it local and viewing it on  
ruby-doc ?

I guess the difference would be if I ever needed to write my own  
documentation.

---

<div class="post-metadata">

**Author:** ![combas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/aca169/32.png) [@combas](https://www.ruby-forum.com/u/combas)\
**Post date:** [February 15, 2006, 11:14pm UTC](https://www.ruby-forum.com/t/gem-rdoc-ri-errors-on-mingw/53846/6 "2006-02-15T23:14:56Z")

</div>

David V. wrote:

> DÅ?a Streda 15 FebruÃ¡r 2006 17:53 Alex C. napÃ­sal:
> 
> > I wonder if documentation is really nessisary though? Sure its nice, but  
> > is there any difference between having it local and viewing it on ruby-doc  
> > ?
> 
> Well, the online version is faster than ri 😉

So _that’s_ why my bandwidth is going through the roof.

🙂

> But at least a working rdoc is somewhat important, I’d say.

I would think so, unless you have a guaranteed Net connection.

–  
James B.

“You harmonize; then you customize.”

- Wilson Pickett

---

<div class="post-metadata">

**Author:** ![combas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/aca169/32.png) [@combas](https://www.ruby-forum.com/u/combas)\
**Post date:** [February 16, 2006, 2:01am UTC](https://www.ruby-forum.com/t/gem-rdoc-ri-errors-on-mingw/53846/7 "2006-02-16T02:01:29Z")

</div>

DÅ?a Streda 15 FebruÃ¡r 2006 23:14 James B. napÃ­sal:

> David V. wrote:
> 
> > DÃ?Ë?a Streda 15 FebruÃ?Â¡r 2006 17:53 Alex C. napÃ?Â­sal:
> > 
> > > I wonder if documentation is really nessisary though? Sure its nice, but  
> > > is there any difference between having it local and viewing it on  
> > > ruby-doc ?
> > 
> > Well, the online version is faster than ri 😉
> 
> So _that’s_ why my bandwidth is going through the roof.

Well, I have a crappy CPU, and a wonderful cable connection.

david@chello082119107152:~$ time ri -T Array#[]  
(snip)  
real 0m0.876s  
user 0m0.589s  
sys 0m0.108s

david@chello082119107152:~$ ping -c 1 [ruby-doc.org](http://ruby-doc.org)  
PING [ruby-doc.org](http://ruby-doc.org) (207.44.206.37) 56(84) bytes of data.  
64 bytes from [tagbomb.com](http://tagbomb.com) (207.44.206.37): icmp\_seq=1 ttl=53 time=152 ms

And unless you set that wossname header to no-cache globally, the strain  
can’t  
be that horrible. At least not from us Opera users.

> 🙂  
> :
> 
> > But at least a working rdoc is somewhat important, I’d say.
> 
> I would think so, unless you have a guaranteed Net connection.

I meant for documentation generation actually.

David V.

---

<div class="post-metadata">

**Author:** ![combas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/aca169/32.png) [@combas](https://www.ruby-forum.com/u/combas)\
**Post date:** [February 15, 2006, 10:56pm UTC](https://www.ruby-forum.com/t/gem-rdoc-ri-errors-on-mingw/53846/8 "2006-02-15T22:56:17Z")

</div>

DÅ?a Streda 15 FebruÃ¡r 2006 17:53 Alex C. napÃ­sal:

> I wonder if documentation is really nessisary though? Sure its nice, but  
> is there any difference between having it local and viewing it on ruby-doc  
> ?

Well, the online version is faster than ri 😉

But at least a working rdoc is somewhat important, I’d say.

David V.
