there are kind of two different issues here - one is a food _intolerance_ - which means your baby can't yet digest a food yet or the food is too acidic for them now. This causes gas, tummy upsets, constipation, or a rash similar to diaper rash (like a red area) around the mouth or bottom. These are usually outgrown pretty quickly - its just that the baby wasn't ready for a certain food yet.
Then there are _allergies_, which take longer to outgrow (or possibly aren't outgrown) and cause more severe symptoms like a bumpy-kind of rash (esp on the tummy, back of knees, or back, apparently), or in a severe case can cause vomitting or trouble breathing. These are the scary part of reactions!
Ok, personal experience........the only thing so far that my daughter _may_ be allergic to is fish. The day after she had some tuna, she got a bumpy red rash on the back of her neck and upper back area. It took about a week to go down. I assumed it was the fish, so we haven't really tried that again and won't for a while!
She has had a couple of bottom rashes when introduced to acidic foods - specifically tomatoes and cantaloupe. I just waited a few weeks and tried again, and they didn't bother her the next time.
When we first started solids she was just constipated for a few weeks from solids in general, not any particular foods. Pears and peaches actually naturally help that, so they were early foods I introduced. She also at times had more gas, but never like tons, and it never seemed to be linked to a certain food. I think especially when you first start solids,their stomach is still getting used to _any_ solid food, so too much of solids can cause gas. I never stopped giving a food because of gas (like i said, it was never severe), but it also never hurts to back off on a food for a couple of weeks if you are worried. Since this is more of an intolerance situation, a few weeks of the digestive track maturing is likely to elminate the problems for foods that are supposed to be pretty gentle to start with.
To go ahead and answer your other question too, my daughter did not have trouble with either pear or sweet potato. I would expect gas to be caused by something eaten just a few hours before (about on the same time frame as you would get a tummy ache from eating something that disagreed with you). So keeping in mind that babies get gas for all kinds of random reasons, I think the sweet potatoes are a more likely culprit than the pears. Like I said above, it never hurts to be extra careful and skip the sweet potatoes for a few weeks if you think they are causing tummy upsets. It doesn't hurt to not give pears for a while either, if you aren't sure. If you are going to worry every time you give her pears, then it isn't worth it. There are lots of other yummy foods for her to try instead (I notice neither peas, avocado or pumpkin is on your list yet
).