Then I don't know. How long was this ride, at what pace and in what conditions?

One bonk doesn't necessarily mean that your entire diet is off. It could be that you just had a bad day or were dehydrated. I do a bit better if I have something within an hour of riding, but that depends on how much I've otherwise eaten during the day.

All that said, I still stand by my advice. Eat something that offers an accessible energy source before your longer rides.