Preheat the oven to 180°C / 350°F / Gas mark 4.
Lightly grease a baking dish using kitchen paper and a little olive oil.
Heat the olive oil in a medium pot over medium heat.
Add the garlic and cook for 30 seconds, stirring.
Crush the tomatoes with your hands then add them along with all the juices from the tin to the pot.
Add several leaves of basil, some salt pepper to taste.
Cook, simmering, until the tomatoes are softened and the sauce has thickened slightly, about 15 minutes.
Remove from the heat, add the sugar and stir.
In a medium bowl, mix the ricotta cheese with the Parmesan, egg, more basil and ¼ teaspoon each of salt and pepper.
Cook the ravioli according to the instruction and drain well.
Lay half the ravioli in the bottom of the dish.
Dot half the ricotta mixture over the ravioli with a spoon and top with half the sauce and half the grated cheese.
Repeat with the remaining ravioli, ricotta and sauce.
Cover with foil and bake for 45 minutes.
Remove the foil and sprinkle with the remaining cheese.
Continue to bake until the cheese is melted, about 10 minutes.
Let cool for 10 minutes.
Garnish with extra torn basil and serve with a green salad.