Get a bag, or something, to carry a spare tube. Learn to use CO2 - pump(?) if you opt for such - best to learn at home rather than some road next to the Addams Family house. And a pump is good - but don't get a "Mini-Pump" as they don't work well - and are likely to make you rip the valve off your tube. Really! Get one with a separate hose that screws-on to the body of the pump.
MUCH better. And toss in a patch-kit. Learn to use at home also.
Now a tool-kit...

... Get a multi-tool. A good one could almost build a bicycle! Many will chime in here - so I'll start:
26 tools - enough to tighten most problems:
http://www.amazon.com/Topeak-Alien-2.../dp/B000FIE4AE
Now you're ready to get back home, or to a phone, in case God hates you.
And get good lights - the Search should help you find lots of rock-throwing apes making suggestions on this subject.