From the Singing With Sinatra tutorial on http://net.tutsplus.com/tutorials/ruby/singing-with-sinatra/