migrate a sinatra app to rails