porting sinatra to rails