Juventus visits Lyon in the first leg of the Champions League round of 16 on Wednesday.
Serie A leader Juventus extended its advantage to four points above Lazio, which visits Genoa on Sunday.
Third-placed Inter Milan is also playing a relegation-threatened team on Sunday as it hosts Sampdoria.
Spal remained firmly bottom of the table, eight points from safety, after a fifth successive defeat.
Ronaldo thought he gave Juventus the lead in the fifth minute but it was ruled offside on video review.
However, the Portugal forward got on the scoresheet six minutes from the break, rushing in at the far post to volley Juan Cuadrado’s cross into the roof of the net.
It took Juventus until the hour mark to double its lead when Paulo Dybala sent in a delightful through ball for Ramsey, who lifted it above Spal goalkeeper Etrit Berisha.
Spal reduced the deficit nine minutes later after Juventus defender Daniele Rugani fouled midfielder Simone Missiroli. After a lengthy wait and the use of video review, a penalty was awarded and Petagna fired it into the bottom right corner.
Fiorentina rescued a 1-1 draw at home to AC Milan despite playing most of the second half with 10 men.
Erick Pulgar leveled from the penalty spot for Fiorentina five minutes from time after Alessio Romagnoli tripped former Milan forward Patrick Cutrone.
Fiorentina also hit the post despite being a man short from the 62nd minute after defender Dalbert tripped Zlatan Ibrahimović. The referee initially just booked Dalbert but showed the Brazilian a straight red card after reviewing the incident on the pitchside monitor.
Ante Rebic gave Milan the lead six minutes earlier.
Ibrahimović also had a first-half goal disallowed for handball.
Milan tied sixth-placed Napoli on points in the race for the European spots.