There are some fruits and vegetables that may be the cause of undesirable gas.
Eating these vegetables raw increases the likelihood of gas forming but cooking them breaks down some of the soluble fiber that is responsible for causing stomach discomfort and gas.
Soluble fiber is great and has a long list of health benefits. But the sudden introduction of this fiber into your diet may cause excessive gas to form.
You might find yourself in this situation if you decide to drastically clean-up your diet and introduce high fiber foods. If this is the case then you want to back away from some of the listed foods, increase your water intake and then slowly start adding them into your diet. Your gut needs time to adjust to the new workout you are giving it through increased fiber intake.
Think of it in terms of beginning an exercise program. You have to start somewhere and small. Maybe you walk for the first few weeks and build up stamina. Next, you begin with a slow jog for a few more weeks and so on until you are able to run for an extended length of time. BAM! In time you are getting into shape.
Your GI is an out of shape gut and needs time to train and prepare for the "fiber workout" it needs (and deserves). Slowly introduce high fiber foods AND water. Give your body time to adjust to the new water, poop and "workout" demands.