First crack at some web sockets code with Ruby/ Sinatra/ em-websockets
Feel free to use this code according to the MIT license.
git clone git@github.com:alibby/ws-chat.git
cd ws-chat
bundle
bundle exec ruby server.rb
Then visit http://localhost:3000/ with your browser.