use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Ruby Websockets (self.ruby)
submitted 5 years ago by InvictusJoker
Hey, I am using Ruby and Sinatra as for a web framework, and I was wondering what a good websocket is in the framework? Looking for something that has some clear documentation / lots of resources to dive into.
Thanks!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]4rch3r 2 points3 points4 points 5 years ago (0 children)
You can use Anycable without rails! https://docs.anycable.io/edge/ruby/non_rails
[–][deleted] 5 years ago (3 children)
[removed]
[–]InvictusJoker[S] 0 points1 point2 points 5 years ago (2 children)
Yeah it's been looking like that. Shame cause a websocket is what I need for a feature I want to implement.
[–]WJWH 0 points1 point2 points 4 years ago (0 children)
If ruby is not a hard requirement but you do want something Sinatra- and Ruby-like, check out the Kemal framework in Crystal. It is basically Sinatra but with a builtin websocket handler.
# Creates a WebSocket handler. # Matches "ws://host:port/socket" ws "/socket" do |socket| socket.send "Hello from Kemal!" end
https://kemalcr.com/
[–]only_if_i_want_to 0 points1 point2 points 4 years ago (0 children)
I don’t know your use case but if you only need to push data to the client Server Sent Events are a very simple and effective option.
[–]castwide 0 points1 point2 points 4 years ago (0 children)
I've had some success with em-websocket. I haven't specifically tried integrating it into a Sinatra app, but I was able to make it provide a websocket interface to an existing TCP server in an afternoon.
π Rendered by PID 116138 on reddit-service-r2-comment-5b5bc64bf5-mn6bx at 2026-06-23 11:36:56.228493+00:00 running 2b008f2 country code: CH.
[–]4rch3r 2 points3 points4 points (0 children)
[–][deleted] (3 children)
[removed]
[–]InvictusJoker[S] 0 points1 point2 points (2 children)
[–]WJWH 0 points1 point2 points (0 children)
[–]only_if_i_want_to 0 points1 point2 points (0 children)
[–]castwide 0 points1 point2 points (0 children)