Skip to content

HTTP 404 when accessing nested pages in system docs via WEBrick #615

@scottmacpherson

Description

@scottmacpherson

I'm struggling to get ri --server working properly with the Ruby core documentation on any of my installations. I've tried ruby-doc packages on fresh installations of Debian and Ubuntu with similar results, so I'm moderately confident the issue is global.

All the system documentation seems to be installed fine: ri ruby: lists all the right pages, and something like ri ruby:syntax/methods works a treat in a terminal.

When I fire up ri --server though, and navigate to the "Ruby Documentation" → "methods" page (/ruby/syntax/methods_rdoc.html), I get a 404 response. It's a similar story for any of the pages which are children of "syntax":

The page /ruby/syntax/methods_rdoc.html was not found

And in the server log when hopping from the "syntax" page (which works fine) to the "methods" page:

::1 - - [26/Mar/2018:13:50:56 AEDT] "GET /ruby/syntax_rdoc.html HTTP/1.1" 200 5886
http://localhost:8214/ruby/ -> /ruby/syntax_rdoc.html
::1 - - [26/Mar/2018:13:47:16 AEDT] "GET /ruby/syntax/methods_rdoc.html HTTP/1.1" 404 134943
http://localhost:8214/ruby/ -> /ruby/syntax/methods_rdoc.html
  • macOS 10.13.3
  • rbenv 1.1.1
  • Ruby 2.5.0
  • ri 6.0.1
$ ri --list-doc-dirs
/Users/scott/.rbenv/versions/2.5.0/share/ri/2.5.0/system
/Users/scott/.rbenv/versions/2.5.0/share/ri/2.5.0/site
/Users/scott/.rdoc
…
$ ls -Al /Users/scott/.rbenv/versions/2.5.0/share/ri/2.5.0/system
…
-rw-r--r--    1 scott  staff    1672 19 Mar 10:53 page-syntax_rdoc.ri
drwxr-xr-x   12 scott  staff     384 19 Mar 10:53 syntax
…
$ ls -Al /Users/scott/.rbenv/versions/2.5.0/share/ri/2.5.0/system/syntax/
…
-rw-r--r--  1 scott  staff  14223 19 Mar 10:53 page-assignment_rdoc.ri
-rw-r--r--  1 scott  staff  12278 19 Mar 10:53 page-calling_methods_rdoc.ri
-rw-r--r--  1 scott  staff  15803 19 Mar 10:53 page-control_expressions_rdoc.ri
-rw-r--r--  1 scott  staff   2987 19 Mar 10:53 page-exceptions_rdoc.ri
-rw-r--r--  1 scott  staff  13753 19 Mar 10:53 page-literals_rdoc.ri
-rw-r--r--  1 scott  staff  16589 19 Mar 10:53 page-methods_rdoc.ri
-rw-r--r--  1 scott  staff   4069 19 Mar 10:53 page-miscellaneous_rdoc.ri
-rw-r--r--  1 scott  staff  10422 19 Mar 10:53 page-modules_and_classes_rdoc.ri
-rw-r--r--  1 scott  staff   1568 19 Mar 10:53 page-precedence_rdoc.ri
-rw-r--r--  1 scott  staff   9292 19 Mar 10:53 page-refinements_rdoc.ri

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions