I agree. An apple and cheese before a 30+ mile ride, especially if you were riding with any sort of intensity, is probably not enough. You don't want to over do your food intake, either, because then your body is using it's energy to digest and not help you ride well, so you have to find the right balance of carbs and protein and the right ones that work for you. Whey protein is a great pre-ride fuel, as well as post ride recovery. Speaking of recovery, you should be getting carbs and protein within 30 minutes of a ride. And the more long or intense the ride, the more real food within the four hour window.
Also, during the ride, anything longer than an hour, you should be having electrolytes. Even if it's less than an hour but hot outside or a high intensity ride, you should also be getting electrolytes.
You may been dehydrated. I don't know that you need more than a cliff bar "during" a 30-ish mile ride, but pre-ride fuel and post ride recovery are important.