The Spanish midfielder broke through after 57 minutes to get Gennaro Gattuso's side back to winning ways after their 3-2 league defeat at home to lowly Lecce last weekend.
Ruiz picked up a Giovanni Di Lorenzo cross, beating three Inter defenders to curl in past a helpless Daniele Padelli.
"This is the real Napoli. Big compliments to my lads," said Gattuso, whose side are 11th in the Serie A table.
But he warned: "There's no reason to smile, we still haven't achieved anything yet."
Antonio Conte's side looked sluggish days after their thrilling 4-2 derby win over AC Milan which put them top of the Serie A table.