I think I was watching Dr. Oz and he said something like if eating carbs make you gassy that means you might have insulin resistance and should be careful about the carbs you eat. Just a thought
I know for me- carbs just ruin me- they make me crave bad stuff and that's why I do south beach diet. I literally have to tell myself NO NO NO when I want something that's not carb friendly.
Try to find your trigger foods I guess- or at least learn from this and maybe next time you won't make that mistake again, and if you do- don't beat yourself up too bad