# Gem\_server

**URL:** <https://www.ruby-forum.com/t/gem-server/123638>\
**Category:** Ruby\
**Created:** [December 19, 2007, 12:11pm UTC](https://www.ruby-forum.com/t/gem-server/123638 "2007-12-19T12:11:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![thefatpenguin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8edcca/32.png) [@thefatpenguin](https://www.ruby-forum.com/u/thefatpenguin)\
**Post date:** [December 19, 2007, 12:11pm UTC](https://www.ruby-forum.com/t/gem-server/123638/1 "2007-12-19T12:11:48Z")

</div>

Have just installed a clean ruby 1.8.5 on windows and ran:

gem update --system

the rdoc server fails to load the index page with an internal server  
error: uninitialized constant Gem::DocManager.

Any ideas?

Full stack trace:

C:\programfiles\>gem\_server  
[2007-12-19 11:02:04] INFO WEBrick 1.3.1  
[2007-12-19 11:02:04] INFO ruby 1.8.5 (2006-12-25) [i386-mswin32]  
[2007-12-19 11:02:04] INFO WEBrick::HTTPServer#start: pid=3128  
port=8808  
[2007-12-19 11:02:19] ERROR NameError: uninitialized constant  
Gem::DocManager  
c:/programfiles/ruby/bin/gem\_server.bat:401  
c:/programfiles/ruby/lib/ruby/site\_ruby/1.8/rubygems/source\_index.rb:166  
:in `each' c:/programfiles/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:166 :in`each’  
c:/programfiles/ruby/bin/gem\_server.bat:374  
c:/programfiles/ruby/lib/ruby/1.8/webrick/httpservlet/prochandler.rb:26:  
in `call' c:/programfiles/ruby/lib/ruby/1.8/webrick/httpservlet/prochandler.rb:26: in`do\_GET’  
c:/programfiles/ruby/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in  
` __send__' c:/programfiles/ruby/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in`service’  
c:/programfiles/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in  
`service’

```
    c:/programfiles/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in

```

`run' c:/programfiles/ruby/lib/ruby/1.8/webrick/server.rb:173:in`start\_thread  
’  
c:/programfiles/ruby/lib/ruby/1.8/webrick/server.rb:162:in  
`start' c:/programfiles/ruby/lib/ruby/1.8/webrick/server.rb:162:in`start\_thread  
’  
c:/programfiles/ruby/lib/ruby/1.8/webrick/server.rb:95:in  
`start' c:/programfiles/ruby/lib/ruby/1.8/webrick/server.rb:92:in`each’  
c:/programfiles/ruby/lib/ruby/1.8/webrick/server.rb:92:in  
`start' c:/programfiles/ruby/lib/ruby/1.8/webrick/server.rb:23:in`start’  
c:/programfiles/ruby/lib/ruby/1.8/webrick/server.rb:82:in  
`start’  
c:/programfiles/ruby/bin/gem\_server.bat:441  
127.0.0.1 - - [19/Dec/2007:11:02:19 GMT Standard Time] “GET / HTTP/1.1”  
500 318

---

<div class="post-metadata">

**Author:** ![thefatpenguin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8edcca/32.png) [@thefatpenguin](https://www.ruby-forum.com/u/thefatpenguin)\
**Post date:** [December 19, 2007, 9:13pm UTC](https://www.ruby-forum.com/t/gem-server/123638/2 "2007-12-19T21:13:22Z")

</div>

On Dec 19, 2007, at 03:11 AM, Oliver R. wrote:

> Have just installed a clean ruby 1.8.5 on windows and ran:
> 
> gem update --system
> 
> the rdoc server fails to load the index page with an internal server  
> error: uninitialized constant Gem::DocManager.
> 
> Any ideas?

Try `gem server`

---

<div class="post-metadata">

**Author:** ![thefatpenguin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8edcca/32.png) [@thefatpenguin](https://www.ruby-forum.com/u/thefatpenguin)\
**Post date:** [December 20, 2007, 11:11am UTC](https://www.ruby-forum.com/t/gem-server/123638/3 "2007-12-20T11:11:53Z")

</div>

Eric H. wrote:

> On Dec 19, 2007, at 03:11 AM, Oliver R. wrote:
> 
> > Have just installed a clean ruby 1.8.5 on windows and ran:
> > 
> > gem update --system
> > 
> > the rdoc server fails to load the index page with an internal server  
> > error: uninitialized constant Gem::DocManager.
> > 
> > Any ideas?
> 
> Try `gem server`

Magic! That got it.  
Thanks

---

<div class="post-metadata">

**Author:** ![thefatpenguin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8edcca/32.png) [@thefatpenguin](https://www.ruby-forum.com/u/thefatpenguin)\
**Post date:** [December 20, 2007, 4:53pm UTC](https://www.ruby-forum.com/t/gem-server/123638/4 "2007-12-20T16:53:18Z")

</div>

Here’s a patch which puts “gem server” in the readme shown by “gem  
help.”

At my current job one of my main roles is to bring up the general  
level of Ruby knowledge and people were telling me that cool feature I  
told them about had been taken out of gems. They actually thought it  
had been erased because nobody but uber-boffins was using it.

The path is a simple diff file, but I made the changes before thinking  
to turn it into a patch - it’s still before 8am so I’m a bit groggy -  
so I just threw in text identifying the filenames. As an aside, would  
you be down with a patch which put the doc text in one place and one  
place only? Seems like a minor hassle at this point but could be a  
thing down the road.

–  
Giles B.

Podcast: [http://hollywoodgrit.blogspot.com](http://hollywoodgrit.blogspot.com)  
Blog: [http://gilesbowkett.blogspot.com](http://gilesbowkett.blogspot.com)  
Portfolio: [http://www.gilesgoatboy.org](http://www.gilesgoatboy.org)  
Tumblelog: [http://giles.tumblr.com](http://giles.tumblr.com)

---

<div class="post-metadata">

**Author:** ![thefatpenguin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8edcca/32.png) [@thefatpenguin](https://www.ruby-forum.com/u/thefatpenguin)\
**Post date:** [December 20, 2007, 7:26pm UTC](https://www.ruby-forum.com/t/gem-server/123638/5 "2007-12-20T19:26:17Z")

</div>

On 19 dic, 08:11, Oliver R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> C:\programfiles\>gem\_server

All the gem\_server, gemlock, gemwhich and other gem\* batch files have  
been “deprecated” in favor of gem :

so gem\_server became gem server

the problem is that gem update --system isn’t doing the same job that  
setup.rb is doing: replacing older batch stubs with “stubs” that  
indicate deprecation.

HTH,

Luis

---

<div class="post-metadata">

**Author:** ![thefatpenguin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8edcca/32.png) [@thefatpenguin](https://www.ruby-forum.com/u/thefatpenguin)\
**Post date:** [January 27, 2008, 10:26pm UTC](https://www.ruby-forum.com/t/gem-server/123638/6 "2008-01-27T22:26:36Z")

</div>

Lee J. wrote:

> Well, I updated rubygems, and got this error:  
> /usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)
> 
> So, I removed and reinstalled rubygems from my repos, (which happened to  
> be version 0.9.4). This was a clean install, yet I still get this error  
> no matter what I do…
> 
> c0re:/home/haze# gem  
> /usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)  
> c0re:/home/haze# gem server  
> /usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)  
> c0re:/home/haze# gem\_server  
> /usr/local/lib/site\_ruby/1.8/rubygems/server.rb:345:in `[]': Symbol as array index (TypeError) from /usr/local/lib/site_ruby/1.8/rubygems/server.rb:345:in`run’  
> from /usr/bin/gem\_server:5
> 
> Any ideas?
> 
> Regards,  
> Lee

I had the same problem on my system. Mine is on ubuntu 7.10. When I  
checked out my /usr/bin directory, I found the gem command and the  
gem1.8 command. When I run the `gem1.8` command, everything runs  
normally. I copied gem1.8 over to gem, and now I can use the gem  
command again.

Regards,  
Leonard

---

<div class="post-metadata">

**Author:** ![thefatpenguin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8edcca/32.png) [@thefatpenguin](https://www.ruby-forum.com/u/thefatpenguin)\
**Post date:** [December 20, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/gem-server/123638/7 "2007-12-20T18:13:58Z")

</div>

Well, I updated rubygems, and got this error:  
/usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)

So, I removed and reinstalled rubygems from my repos, (which happened to  
be version 0.9.4). This was a clean install, yet I still get this error  
no matter what I do…

c0re:/home/haze# gem  
/usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)  
c0re:/home/haze# gem server  
/usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)  
c0re:/home/haze# gem\_server  
/usr/local/lib/site\_ruby/1.8/rubygems/server.rb:345:in `[]': Symbol as array index (TypeError) from /usr/local/lib/site_ruby/1.8/rubygems/server.rb:345:in`run’  
from /usr/bin/gem\_server:5

Any ideas?

Regards,  
Lee

---

<div class="post-metadata">

**Author:** ![thefatpenguin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8edcca/32.png) [@thefatpenguin](https://www.ruby-forum.com/u/thefatpenguin)\
**Post date:** [January 27, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/gem-server/123638/8 "2008-01-27T23:15:36Z")

</div>

> I had the same problem on my system. Mine is on ubuntu 7.10. When I  
> checked out my /usr/bin directory, I found the gem command and the  
> gem1.8 command. When I run the `gem1.8` command, everything runs  
> normally. I copied gem1.8 over to gem, and now I can use the gem  
> command again.

I think that Ubuntu’s packaged version of ‘rubygems’ (the one installed  
with Synaptics, Adept, or apg-get) is too old. Remove the packaged  
version and install the latest rubygems from  
[http://rubygems.org/read/chapter/3](http://rubygems.org/read/chapter/3).

The other side-effect this has is that on Ubunty 7.04 and 7.10, the gem  
installation directory moves from /var/lib/gems/… to  
/usr/lib/ruby/gems/… I reinstalled all my gems. There may be a way  
to play with some environment variables, but it wasn’t worth the trouble  
to me to keep something working that doesn’t follow convention (it’s not  
the Rails way).
