Sinatra to Rails migration