Pusher-chat is a project mainly written in Ruby, it's free.
A simple chat application using Pusher
A sample application using Pusher