You may also find that different types of foods help at different parts of a ride.
Once I hit a certain point my stomach detests solid foods. At that point I switch entirely to liquid nutrition like gels.
I have a twitchy stomach and figuring it out is quite the chore.