Sinatra-Shortener is a project mainly written in RUBY and JAVASCRIPT, it's free.
A Datamapper Sinatra URL Shortener