It was set in the stone age. The boy was part of a tribe, they had rituals (I remember fire ants being a part of the "becoming a man" ritual.) The boy had a pet dinosaur, I believe it was some type of flying dinosaur, maybe pterodactyl or something similar. The dinosaur was flying with the boy on its back.
I have no idea when the show was made but I watched it on TV around 2005-2010 probably.
If you have any questions I am happy to answer, I've been looking for this show for years, haven't come any closer.