Skip to content

Ruby WEBrick server choking, possibly on absence of HTTP response headers #6

@gregoryfoster

Description

@gregoryfoster

The http.sh script starts up the http.rb Ruby Sinatra application. In my Ruby 2.4.0-rc1 environment, I'm starting with a blank slate with no configuration of Sinatra or Ruby, so it tries to use the Ruby default WEBrick server to locally host the guide.

After generating the HTML guides and running the Ruby server, I attempted to play the guide in the Neo4j browser and received an HTTP 404 and an unhelpful default error message about the topic being unavailable. The server's terminal output wasn't too helpful either.

Navigating directly to the guide in a web browser turned up the following error:

http://localhost:7474/browser/ -> /legis-graph/legisgraph.html
::1 - - [11/Feb/2017:11:34:24 -0600] "GET /legis-graph/legisgraph.html HTTP/1.1" 404 494 0.0004
[2017-02-11 11:34:24] ERROR NoMethodError: undefined method `split' for nil:NilClass
	/path/to/.rvm/gems/ruby-2.4.0-rc1@legis-graph/gems/rack-1.6.5/lib/rack/handler/webrick.rb:99:in `block in service'
...

A little hunting indicates WEBrick may be bricking because of an absence of HTTP (response?) headers - although it looks to me like both the Ruby and Python server scripts try to send the same response headers. This is about as far as I pursued matters, and switched to focus on running the Python version of the server.

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