Try switching his dog food, giving him more exercise and interesting things to do, and a few doggie treats, like a rawhide bone. If he still isn't gaining weight, take him to the vet.
If your dog is under a year old he/she won't gain weight until they stop growing. If your dog is older it could be a overactive thyroid issue. I would definitely check with your vet they could do tests to determine if your dog has any issues.
I'm a little confused as these statements are contradictory. Not gaining could be related to several things: excessive exercise or many health issues (of which intestinal parasites is one). I recommend a vet trip. Not losing weight is likely overfeeding and/or lack of appropriate amounts of exercise. Cut back food intake by 1/4 and up physical activity.