You don't really have to beat battery energy density to be better for longer range riding, you just have to have a minimum acceptable range and the ability to quickly refuel. For example having to stop every 100km for five minutes is likely going to be more acceptable to the majority than stopping every 200km for an hour.
Of course the real trick is to both figure out how far the minimum distance is for most people and - most importantly - making refuelling widely enough available that people can work on the assumption of just pulling in and filling up.
For something like the pictured gun you're probably not getting much more in the way of accurate range than just holding a knife, and a knife would be a lot more reliable.
I would also assume that if you can get hold of ammunition to load an improvised gun it's not that much more of a stretch to acquire an actual gun to put said ammo into.