Preheat oven to 350 degrees F. Line 2 cupcake tins with parchment or paper liners.
In a medium bowl, whisk together the flour, baking soda, cinnamon, nutmeg, salt and ginger. Set the dry mixture aside.
In the bowl of a stand-up mixer, with the paddle attachment, add the butter, white sugar and brown sugar; beat until nice and fluffy, about 2 to 3 minutes. Pour in the oil and eggs. Beat until combined.
Alternating between the buttermilk and the dry mix, add them to the butter mixture, until just combined. Lastly, add the carrots and walnuts and mix until thoroughly distributed throughout the batter.
Pour the batter into the prepared cupcake liners, filling them up about 3/4 of the way. Transfer to the oven to bake for 20 to 22 minutes, or until a skewer inserted into the center comes out clean.
Allow them to cool in the pan for about 5 minutes and then transfer them to a cooling rack to cool before adding the frosting.