Gem_server

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 :ineach’
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: indo_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:inservice’
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:instart_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:instart_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:ineach’
c:/programfiles/ruby/lib/ruby/1.8/webrick/server.rb:92:in
start' c:/programfiles/ruby/lib/ruby/1.8/webrick/server.rb:23:instart’
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

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

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

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
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com

On 19 dic, 08:11, Oliver R. [email protected] 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

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:inrun’
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

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:inrun’
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.

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.

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).