several things to note here... the gas sounds like it is from nuts, what kind of nuts? Nuts are notoriously hard to digest and are actually considered digestion inhibitors. Almonds and pecans are the easiest, and peanuts and cashews the hardest to digest.
I have digestive issues too. I was gluten and diary free and am now to be considered carbohydrate intolerant which is all grains, most beans and some veggies. I also don't do diary.
Anyway, if you slipped up on gluten and don't do so well on diary the gas could just be a buy product of your body and gut going a little nuts (ha ha) with what you have eaten recently. You may also have a bacterial imbalance and the overgrown bacteria is feeding off the nuts and creating a gas buy product.
My advice is to stop all gluten and diary, lay low with the nuts and give your gut some time to heal. Find a good probotic and don't over do it with vitamin suppliments and all of that. Just eat healthy whole food.
not all who wander are lost