Harold Ramirez homered in a five-run first inning to help lead the Tampa Bay Rays to victory over the Miami Marlins 5-4.