private_pub
private_pub copied to clipboard
Status must be >=100 seen as integer
I am having a problem getting this to run. The error is:
127.0.0.1 - - [25/Jan/2012 11:07:11] "GET /faye.js HTTP/1.1" 200 - 0.0022
Rack::Lint::LintError: Status must be >=100 seen as integer
/var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/lint.rb:19:in assert' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/lint.rb:425:incheck_status'
/var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/lint.rb:50:in _call' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/lint.rb:36:incall'
/var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/showexceptions.rb:24:in call' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/commonlogger.rb:20:incall'
/var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/chunked.rb:43:in call' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/content_length.rb:14:incall'
/var/lib/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:in block in pre_process' /var/lib/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:incatch'
/var/lib/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in pre_process' /var/lib/gems/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:53:inprocess'
/var/lib/gems/1.9.1/gems/faye-0.7.1/lib/faye/thin_extensions.rb:43:in receive_data' /var/lib/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:inrun_machine'
/var/lib/gems/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in run' /var/lib/gems/1.9.1/gems/thin-1.3.1/lib/thin/backends/base.rb:61:instart'
/var/lib/gems/1.9.1/gems/thin-1.3.1/lib/thin/server.rb:159:in start' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler/thin.rb:13:inrun'
/var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:265:in start' /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:137:instart'
/var/lib/gems/1.9.1/gems/rack-1.4.1/bin/rackup:4:in <top (required)>' /var/lib/gems/1.9.1/bin/rackup:19:inload'
/var/lib/gems/1.9.1/bin/rackup:19:in `
This error appears to only occur when trying to start the faye server in development mode (rackup private_pub -s thin -E development) - and running in production mode seems to work correctly.
I will leave this ticket open though - also it might be nice to clarify the instructions so others do not run into this issue.
IIRC Faye does not work in development mode. From its web site:
...and set the environment to production so that Rack does not load the development middlewares that are not compatible with Thin’s async protocol.
The private_pub readme does specify to run Thin in production (though it does not specify exactly why).
In case it's useful to others--- I've hit this same problem when mixing the (EventMachine-based) websocket-rack gem with a Padrino application in development mode. It works fine in production. It's a Rack+Thin issue.
This is also a duplicate of Faye issue #25