Ruiz put the Phillies ahead to stay with a run-scoring single in the first inning and made it 5-3 in the eighth with a solo shot as Philadelphia won for the fifth time in seven games.
The Phillies catcher has gone 6-for-9 with five runs scored over the first two contests of Philadelphia's four-game series against the Pirates.
Vance Worley (4-4) yielded three runs on six hits over six full frames to notch the win, while Jonathan Papelbon racked up his 18th save despite allowing a Michael McKenry homer in ninth.
McKenry finished 3-for-3 with two RBI for Pittsburgh.
Gal Gadot cast as Wonder Woman for 'Batman vs. Superman'
Kate Middleton recycles dress at movie premiere