Running lentils - I'm not doing big distances and haven't been running all that long, so I'm not sure I have prevented it yet. Genuinely I take 20p on my runs so I can get into the loos! Was NOT impressed on Saturday afternoon to discover that despite the fact you have to pay to get in they are electronically locked at 4.30pm. There were still loads of people around at that time (4.40 was when I was trying to get in)!
Anyway, it is better if I get up, eat, umm, answer nature's call and then run about 1-2 hours after running. Not always practical of course, but I think leaving a good gap between eating and running helps. I was also having quite a lot of fruit so not having fruit prior to a run (bananas fine). I don't think fibre as such makes much difference to me - I think it is more the fruit sugars.
I think it comes down t trial and error - think about the runs it has been a problem and the ones it hasn't. What was the difference? Eg timing of meals, diet consumed, hydration.