1. Preheat the oven to 180°C/Gas 4/Fan 160°C.
2. To make the topping, put the sugar, butter and rum into a pan and heat for 2 minutes, until the sugar has melted, stirring occasionally. Pour a little of the mixture into the bottom of each ramekin, then put a pineapple slice with a cherry inside on top.
3. To make the cake: put the coconut in a pan over a gentle heat, stirring often, until it begins to turn light golden brown, then remove from the heat and leave to cool.
4. Mix the remaining cake ingredients together until they are well combined. Stir in the cooled coconut. Spoon the mixture over the pineapple slices.
5. Place the ramekins on a baking sheet and bake for 25 minutes or until well risen and golden brown. If they aren't cooked cover with foil and continue to cook for a further 10 minutes or so.
6. Turn the puddings out, reheat any leftover topping and pour over the puddings. Serve with either custard or cream.