I'll take bear spray over a gun any day, even in grizzly country. In the extremely unlikely event of attack, you would have very little time to fire off an accurate round. Bear spray can be used from the hip and has such a wider area of coverage. I think carrying a sidearm is more comforting mentally but not the best choice. Not to mention bear spray is much lighter. Here is a link discussing this very topic:
http://fwp.mt.gov/mtoutdoors/HTML/articles/2014/bearspray.htm#.VQ28xTXRfBA