Converting Sinatra app to Rails App