Grease 12 muffin cups with butter or line with paper liners.
Sift flour, white sugar, baking soda, cinnamon, and ginger together in a large bowl.
Beat canola oil and eggs into flour mixture with an electric mixer, beating each egg thoroughly before adding the next one.
Stir carrots into mixture until well combined.
Fill the prepared muffin cups about 2/3 full with carrot mixture.
Bake in the preheated oven until cupcakes are lightly browned and a toothpick inserted into the middle of a cupcake comes out clean, 30 to 40 minutes. Let cupcakes cool completely.
Beat unsalted butter and cream cheese together with an electric mixer on high speed in a bowl until fluffy. Reduce mixer speed to low and beat in vanilla extract and confectioners' sugar until combined. Increase speed to high, and beat until the frosting is fluffy, about 3 more minutes.
Fill a pastry bag with the cream cheese frosting and pipe onto the cupcakes.