 On 20 June, Ruiz scored the only goal as Costa Rica upset four-time champion Italy 1–0 to qualify for the round of 16, where he again scored his team's goal as they drew 1–1 with Greece.Ruiz later successfully converted his kick as Costa Rica prevailed 5–3 in the penalty shootout.At the quarter-final stage, Ruiz was one of two Costa Ricans to have their kicks saved by Tim Krul in a 4–3 penalty shootout loss to the Netherlands.