Gem_server won't deliver css from alternate template

I like the way rdoc html looks better when using Jamis B.'s rdoc

So I put a copy here:


and with a little help I can get rails to use it when making
documentation for my apps, itself, and the plugins I use.

I wanted to use it with the rdoc for my gems so I added a ~/.gemrc
file to my home directory with this in it:

rdoc: --template jamis --inline-source --line-numbers

Now when gem builds the rodc these options are used …


gem_server doesn’t actually serve the rdoc-style.css files that rdoc
creates – instead it appears to delivers a copy of the standard rdoc
1.0.1 template that is hard-coded into gem_server.rb.

line 398 (rubygems/sever.rb):

 s.mount_proc("/rdoc-style.css") do |req, res|
   res['content-type'] = 'text/css'
   res['date'] = File.stat(spec_dir).mtime
   res.body << RDOC_CSS

rdoc appears to put a copy of rdoc-style.css in the root of every
html output folder it creates. However gem_server always uses it’s
own css.

Ths fixes the problem by only using the hard-coded stylesheet for the
top level document.

— rubygems/old_server.rb 2007-02-10 09:07:01.000000000 -0500
+++ rubygems/server.rb 2007-09-01 20:34:12.000000000 -0400
@@ -33,7 +33,7 @@

RubyGems Documentation Index - +
@@ -395,7 +395,7 @@ res.body << Gem::SourceIndex.from_gems_in(spec_dir).to_yaml end
  • s.mount_proc("/rdoc-style.css") do |req, res|
  • s.mount_proc("/gem-server-rdoc-style.css") do |req, res|
    res[‘content-type’] = ‘text/css’
    res[‘date’] = File.stat(spec_dir).mtime
    res.body << RDOC_CSS

Patch also sent to

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs