Its important to take fibre about 30 mins before eating. In fact i usually take it and hour or more before eating.
As scott says there are different types of fibre. If you have only just started taking your fibre, try and stick with it a bit. Can take a week or 2 of the body to adjust and produce less gas. If that doesnt work try a different type.
I use pure psylium husk (5mg) in the morning and inulin (5mg) in the evening. To start with the Inulin gave me crazy gas.. seems to be better now though