Another way to open a bottle of beer when you're stuck without an opener is to use a sheet of paper.
First, you fold the paper in half. Then, turn it, fold it in half again, and keep folding it in half in the same direction until you can't fold it anymore. And fold it one more time along its length to create a hard edge. And place that hard edge under the edge of the cap, using the rest to lever... and pop it off.
This technique might take a little bit of practice, and you probably won't be able to use the same piece of paper more than once or twice.