Git Product home page Git Product logo

Comments (4)

jeremyevans avatar jeremyevans commented on June 21, 2024 1

I've confirmed this is an issue with Rack::Lint. If I use the Rack::Lint middleware explicitly, I get that error. This is either a bug in Rack::Lint::HijackWrapper or a bug in faye-websocket for not handling Rack::Lint::HijackWrapper. Personally, I think it is a bug in the Rack::Lint. I would file a issue in rack, and if they say it's not a bug in rack, then file a issue in faye-websocket.

I don't think it is a bug in Roda, I think you would run into this in other frameworks that use faye-websocket and Rack::Lint together, unless the framework had a specific workaround for this bug. I try to avoid having framework workarounds for bugs in other libraries, as that makes it less likely for the underlying bug to get fixed.

I think the following is needed to get Rack::Lint::HijackWrapper to work with faye-websocket:

class Rack::Lint::HijackWrapper
  def to_int
    @io.to_i
  end
end

from roda.

jeremyevans avatar jeremyevans commented on June 21, 2024

From the error message, it looks like this is related to Rack::Lint. Can you try running without Rack::Lint and see if it works? Assuming it works without Rack::Lint, this probably a bug in Rack::Lint.

The Roda specs use thin and not puma, but I have tested the websocket support with puma and it does work (slightly older version, 2.12.1, but I doubt that matters).

from roda.

jgaskins avatar jgaskins commented on June 21, 2024

How do I do that? I didn't add it in, the only gems I installed myself were roda, clearwater, faye-websocket, and slim (and maybe one other, but nothing rack-related). So I assumed it was something in the Roda/Rack/Faye triad.

I actually went with Puma as a web server because it didn't work with thin, either, but I figured I was screwing something up. When it didn't work with puma, I figured it might be time to file an issue.

from roda.

jgaskins avatar jgaskins commented on June 21, 2024

Awesome, I really appreciate you taking the time to check it out. I wasn't using Rack::Lint explicitly, but maybe something was injecting it. My own experience in dealing directly with Rack is pretty limited and the hours I spent trying to figure this out were entirely fruitless, mostly because I didn't know what to look for. I'll go ahead and put in an issue on Rack.

from roda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.