Migrating app from Sinatra to Rails