Wouldn't you just become a rolling annoyance for all animals within earshot of that thing as you traveled? I personally wouldn't go that route. In fact, every time I've encountered a dog giving chase I've simply stopped the bike, and that stopped the dog. Works almost every time. If for some reason the dog just seems out to get you, keep the bike between you and the dog. Pick the bike up if necessary. Yell "NO!" loudly until it goes away. Spray your water bottle on them if they're particularly tenacious.