Sinatra to Rails