Sanabia (3-6) broke a five-start losing streak with his first victory since April 16. The right-hander limited the Phillies to one run on seven hits, walking one while fanning three.
Ruggiano's RBI double in the sixth inning broke a 1-1 tie and he doubled the advantage with a run-scoring single in the eighth.
Nick Green followed with two RBI for the Marlins, who took the opener of a three-game series.
Phillies starter Cole Hamels (1-7), meanwhile, dropped his fourth consecutive start despite yielding just two runs on seven hits over six full frames. He struck out 10 in the loss.
Domonic Brown went 2-for-4 with a solo homer for Philadelphia.