Just out of curiosity did you eat anything prior to or during your ride? Were you properly hydrated? From my experience, bonking comes from malnutrition... so that may have been your issue, on your next "hard" ride, try taking along a candy bar or bottle of Gatorade (mixed with water so you don't end up feeling bloated after drinking).