The most common cause for gas and bloating is lack of acid in the stomach and a lack of flora in the intestines, which also produce acids. These acids help keep yeast under control preventing gas from fermentation by the yeast. A lack of stomach acid also increases fermentation in the stomach from foods not being digested properly.
The best way to increase stomach acid is with bitters. These are bitter tasting herbs. When they contact the bitter receptors on the tongue this stimulates the vagus nerve, which in turn kicks up stomach acid, bile and pancreatic enzymes. They also have a cleansing effect on the liver and a mild stimulatory effect on the intestines. Some bitters also contain some strong laxatives, so watch your dosage. You can find bitters in any health food store.
Zinc and B vitamins are also essential for the production of stomach acid. I recommend 50mg of zinc daily with your largest meal, and either high B vitamin foods (rice bran, oat bran, nutritional yeast) or a B50 complex twice daily with meals.
The supplement TMG (trimethylglycine) is also useful for increasing stomach acid. Recommended dose is 500mg three times daily with meals.
For the intestines to build up the flora I recommend kefir and fibers. Recommended dose on the kefir is a glass first thing in the morning and a glass before bed. Drink a little water afterward to rinse the acid off the teeth. For fiber I like rice bran, oat bran or FOS, which can be taken with meals.
If this does not take care of the bloating then you can add a little yucca root as a surfactant to cut down the fermentation. Yucca will also help the flora to grow.