1 1/2 cups grated fresh carrots (about 2 large)
1/2 cup walnut pieces
1/2 cup finely chopped fresh pineapple (see Cooks Note)
1/4 cups all-purpose flour
2 teaspoons ground cinnamon
1/2 teaspoon freshly grated nutmeg
1/2 teaspoon ground ginger
1 teaspoon baking soda
1/2 teaspoon fine salt
4 large eggs
1 1/2 cups sugar
1 1/4 cups vegetable oil
2 (4-ounce) jars pureed carrot baby food
2 (8-ounce) packages cream cheese (1 pound), at room temperature
12 tablespoons (1 1/2 sticks) unsalted butter, cubed, at room temperature
2 cups confectioners' sugar
1 1/2 tablespoons finely grated lemon zest (about 2 lemons)
1 teaspoon pure vanilla extract
1 1/2 cups fresh pineapple
For the cake:
Preheat oven to 350 degrees F. Butter 2 (8-inch) square cake pans, line them with buttered parchment paper, and dust with flour.
Toss the carrots, walnuts and 1/2 cup pineapple with 3/4 cup of the flour in a small bowl and set aside.
Whisk the remaining 1 1/2 cups flour, cinnamon, nutmeg, ginger, baking soda, baking powder and salt together in a medium bowl.
In another large bowl beat the eggs and sugar with an electric mixer until thick and light, about 5 minutes. While continuing to beat the eggs slowly, gradually add the oil, and then the pureed carrot.
Scatter the dry ingredients over the wet and then gently fold them together to make a loose batter. Gently fold the nuts, carrots, and pineapple into the batter. Pour into the prepared pans. Bake the cakes until firm to the touch and a cake tester comes out clean, about 45 minutes. Cool cakes in pans on a rack for 25 minutes. Turn cakes out of pans and cool completely on the rack.
For the icing:
Beat cream cheese in a large bowl, with an electric mixer until smooth and fluffy. Gradually beat in the butter until smooth. Sift the sugar over the cream cheese, and beat until smooth. Add the lemon zest and vanilla extract and beat until light and fluffy. Refrigerate to set slightly for about 20 minutes.
To assemble the cake, place a cake layer on a cake stand, plate, or cake board. Spread about half of the icing over top, but leave the sides bare. Sprinkle icing with about half of the pineapple. Top with a second cake layer, and repeat with remaining icing and pineapple. Serve.