Converting a Sinatra application to a Rails application