Trackomatic is a project mainly written in Ruby, it's free.
[experimental] A simple event machine based (Goliath) analytics tracking tool