How many miles? I've ridden a century (100 miles) and you have to eat and drink almost constantly on the bike and I prepared for months in training rides and tapered my riding for a week prior to the ride. No booze during that week and I carb'd up the night before the ride. I had no trouble completing it.
There are multiple things you could be doing wrong. So much more detail you are leaving out of your post, what are you eating, what is your weight, what kind of distance do you ride, how long have you been riding, what is your age, do you drink alcohol, also, do you have any history of diabetes or getting hypoglycemic during a ride in the past?
Edit-For some excellent tips on riding longer distances, training, and bicycling in general I'd recommend joining bikeforums.net. Generally a good group of people, I've met up with some of them and done some group rides over the years. Lots of good information to be had there from road racing to vintage bikes to mtb and commuting.