I agree with , you should always be prepared and have a backup in case you do ever hit that failure point! But now you know and you can't be expected to know everything and be ready before hand. In the future just throw together an emergency back pack with these kind of things and ideally some food and water to last a day or two.
RE: HOW TO END A GREAT AND FUN BIKE RIDE, IN A BAD WAY...