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.
Ruby 1.9.2+ is the preferred version of Ruby for running Cramp. Installation process is quite straight forward:
$ gem install crampAnd here’s the obligatory “Hello World”:
# hello_world.ru require "rubygems" require 'cramp' class HomeAction < Cramp::Action def start render "Hello World" finish end end # thin --timeout 0 -R hello_world.ru start run HomeAction
Cramp ships with an application generator, which is great for getting off the ground.
$ cramp new realappYou can find various other Cramp applications in the examples section. Please read through the documentation for finding out more about Cramp.
Cramp is hosted on Github. Please use Github Issues for submitting bug reports and Pull Requests for submitting patches.
Please send all your questions to the Cramp mailing list. Feel free to tweet @lifo with any suggestions or feedback.