Questions tagged [cramp]

Cramp is a fully asynchronous real-time web application framework in Ruby.

Cramp is a fully asynchronous real-time web application framework in Ruby. It is built on top of EventMachine and primarily designed for working with larger number of open connections and providing full-duplex bi-directional communication.

11 questions
7
votes
1 answer

How to create a Rails/Ruby method similar to javascript throttle/debounce function

In our application we expose a callback route for an external service to hit. When we receive the callback, we publish an update to client-side subscribers using Eventsource on the client/browser-side and cramp on the server side. Sometimes,…
daino3
  • 4,386
  • 37
  • 48
4
votes
2 answers

Is there a stable, production ready library for ruby for websockets?

I've been using Socket.io with node.js for some time, but I'd really love to do this in Ruby. There seem to be some projects available, but most of them are dead, namely: danthes - fork of Ryan Bates' private_pub cramp - no activity for the past 9…
Jakub Arnold
  • 85,596
  • 89
  • 230
  • 327
3
votes
1 answer

How to serve a Cramp::Websocket and a normal Rack app on the same port?

I'm trying to use the same port to serve normal HTTP traffic as well as an HTML5 websocket via Cramp (which is built on top of EventMachine), using Ruby 1.9.3 and Thin 1.3.1. Here is a minimal, self-contained example: require 'thin' require…
Thomas
  • 174,939
  • 50
  • 355
  • 478
2
votes
1 answer

Cramp and heroku

I have been playing around with Cramp to do some real time pushing of information in an app. Its all working great locally but when I push off to heroku I seem to be having issues with the ports. I have a socket set up in cramp which inherits from…
1
vote
0 answers

"Hello World" with Cramp

I decided the much ignored but nonetheless amazing looking Cramp framework might be worth forking and picking up. I tried a basic hello world. However, it blows up on…
RedMage
  • 1,126
  • 1
  • 9
  • 21
1
vote
1 answer

Real time updates through Cramp(Ruby) and SSE(HTML5)

I have prepared a sample application to get updates from server in real time using Cramp(Ruby) and SSE(HTML5). I am getting following errors while accessing the html through http://localhost/sse_time.html Errors: Chrome: Uncaught Error:…
Amit Patel
  • 15,609
  • 18
  • 68
  • 106
1
vote
1 answer

Debugging Cramp applications involving server sent events

Im using Cramp (http://cramp.in) for implementing server-sent events in my application.Im using thin as the server for running the app.In Rails i could use the debugger gem to debug my rails app.Can debugger be used to debug cramp applications as…
raza.sayed
  • 539
  • 1
  • 9
  • 23
1
vote
1 answer

Request read through websocket getting garbled

I am attempting to create a minimal Websocket implementation using Cramp framework. Where as Cramp successfully renders normal web content, I run into trouble when I try to use HTML5 websockets. My action class is as follows :…
lorefnon
  • 12,875
  • 6
  • 61
  • 93
0
votes
1 answer

Strange errors when doing bundle install with Cramp

Here is a Gemfile of default Rails application. source 'https://rubygems.org' gem 'rails', '4.1.0' gem 'sqlite3' gem 'sass-rails', '~> 4.0.3' gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', '~> 4.0.0' gem 'jquery-rails' gem 'turbolinks' gem…
Paul
  • 25,812
  • 38
  • 124
  • 247
0
votes
1 answer

cramp framework sync 'render' correct way using em-synchrony

To describe my problem I attach simple Cramp http://cramp.in/ class. I add some modification but its mainly work like https://github.com/lifo/cramp-pub-sub-chat-demo/blob/master/app/actions/chat_action.rb class ChatAction < Cramp::Websocket …
mateuszdw
  • 61
  • 1
  • 8
0
votes
1 answer

Can Devise be used for authentication in a Cramp app?

I have created an app using the Cramp.in(http://cramp.in) framework. I need to now setup authentication for the application. In Rails i have used Device for this purpose. Can Device be used in a Cramp application or should i use something else…
Kris
  • 1,403
  • 3
  • 17
  • 26