If you're like me and forget to eat while on a long ride, or get caught out late, I like to have some energy gels and such like runners use.
GU, Power Bar, Hammerhead all make them. Some have caffeine in them too. Just a nice shot of carbs and sugar to give you a boost. Very nice for a pick up after a nasty section that used a lot of energy.
They also make Chews that are like gummy bears in consistancy that work great.
Proper nutrition and hydration is key, but these are a nice supplement on those long rides.
Make sure to drink water, especially if using ones with caffeine, and test them out before a ride. Some people are sensitive and get stomach aches when eating the gels. Plus some flavors are hard to swallow. I've never had an issue and I use them on runs and bike rides.