Cook the pasta in boiling water according to the instructions on the packet. Drain.
Meanwhile, heat the oil in a nonstick frying pan, add the onion and garlic and fry for 3 minutes until softened. Then add the ham and cook for 1 minute.
Add the ricotta, rocket, Parmesan and wine to the pan and heat through for 1 minute. Toss the sauce through the cooked pasta, season to taste with salt and pepper and serve hot.