Factors to Consider
My personal experience is that when I am road racing, be it a marathon, Comrades 90k, or 100k World Cup, I have to stick with liquid nutrition. The combination of a high level of effort and the pounding of the road make it impossible to eat solids without issues. I prefer a tasteless carbohydrate solution in my bottles, and then energy gels as a supplement. I typically will stuff my pockets and jog bras with gels. I will even tape an extra gel somewhere to my body, just in case I drop something or have an aid station mix up.
Trail running is completely different. Because of the softer surface, the change in tempo, such as going out slow, hiking the steep hills, etc, I will eat solid food in the first half of a 100k or 100 mile race. Turkey sandwiches, fruit, and potatoes are some of my favorites. By the time the second half rolls around, I find it hard to stomach much, so I will switch to only gels. All along the way, especially if I have crew to help, I usually will supplement with a tasteless carbohydrate solution.