Chewing gum are quite a common mess on carpet but this can be removed by a couple of ways. These include:

Plastic bag of ice
Place the ice bag on the chewing gum in order to freeze it.  Have a knife, preferably a butter knife. This is because its blunt and won’t damage your carpet. Use the knife to scrape the frozen gum of the carpet then clean over any remaining fragments.

Vinegar is your ultimate cleaning agent. Have a solution of white vinegar in a container, to make add   4 teaspoons of vinegar to 1 cup of water. Dip a rag in the solution then carefully and gently rub the rag on the spots to which the gum has stack. This may take about 15-20 minutes to make the gum saturated with the vinegar solution.

After the gum has eased off and you have removed it, use now a dry thick towel to dry the area. Avoid contact with this part till you are completely sure its dry of the soapy solution.

Peanut butter
You might be wondering how this delicacy can be used. Yes, it can serve you right. The butter has natural oils that do work by dissolving the gum on carpets or fabrics. Take a bit of peanut butter using your gloved fingers and apply and rub it on the chewing gum. Do not do it once but a couple of times. After applying gently work the butter on the gum to ease it of the use a butter or dinner knife to scrape of the gum from the carpet till the gum is off.

After this you may now brag about the sparking chewing gum free carpet that you have.