Preheat oven to 400 degrees.
On a sheet pan lined with aluminum foil, place potatoes. Transfer to oven and bake until tender, about 40 minutes. (Alternatively, place potatoes in a steamer basket in a large pot with enough water to just come through the bottom of steamer basket. Bring water to a boil and cook, partially covered, until potatoes are tender but not soft, 20 to 30 minutes).
Remove potatoes and let them stand just until cool enough to handle. (The hotter the potatoes are when they are peeled and riced or milled, the lighter the gnocchi will be.) Working quickly and protecting the hand that holds the potatoes with a folded kitchen towel or oven mitt, scrape skin from potato with a paring knife. Press peeled potatoes through a potato ricer. (Alternatively, potatoes can be passed through a food mill fitted with a fine disc, but a ricer makes fluffier potatoes and therefore lighter gnocchi.) Spread riced potatoes into a thin, even layer on work surface, without pressing or compacting them. Let cool completely.
In a small bowl, beat together egg, salt, pepper, and nutmeg. Gather cooled potatoes into a mound and form a well in center. Pour egg mixture into well. Knead potato and egg mixtures together with both hands, gradually adding grated cheese and enough flour (about 1 1/2 cups) to form a smooth but slightly sticky dough. (It should take no longer than three minutes to work flour into potato mixture; remember, the longer the dough is kneaded, the more flour it will require and the heavier it will become.) As you knead the dough, it will stick to your hands and to the work surface. Repeatedly rub this rough dough from your hands and scrape it with a knife or dough scraper from the work surface back into dough as you knead.
Wash and dry your hands. Dust dough, your hands, and work surface lightly with flour. Cut dough into 6 equal pieces and set aside. Pat one piece dough into a rough oblong shape, then roll dough into a half-inch-thick rope, lightly flouring if necessary to keep from sticking. Slice rope into 1/2-inch-thick rounds. Sprinkle rounds lightly with flour and roll each piece quickly between your palms into a rough ball, flouring dough and your hands as needed to prevent sticking.
Hold tines of a fork at a 45-degree angle to table with concave part facing up. Dip the tip of your thumb in flour. Take one ball of dough and, with the tip of your thumb, press dough lightly against tines of fork as you roll it down toward tips of tines. As dough wraps around the tip of your thumb, it will form into a dumpling with a deep indentation on one side and a ridged surface on the other.
Set on a baking sheet lined with a floured kitchen towel or parchment paper and continue forming gnocchi from remaining dough balls. Repeat with remaining pieces of dough.
Bring 6 quarts of salted water to a vigorous boil in a large pot over high heat.
Meanwhile, in a large, high-sided skillet, heat the tomato sauce. Stir in the ricotta. [hyperlink]
Drop about half the gnocchi into boiling water, a few at a time, stirring gently and continuously with a wooden spoon. Cook gnocchi, stirring gently, until tender, about 1 minute after they rise to surface. Remove with a slotted spoon and transfer to skillet with tomato sauce and ricotta. Gently combine until warmed through. Transfer to a serving platter and garnish with Parmigiano and basil leaves.