Gum in carpet or upholstery can be a nasty business. Your first line of attack is with an ice cube. This freezes the gum and makes it brittle, much easier to remove. If there are still pieces left, you can use an oil like olive oil. Finally, if it is still a problem, go to the hardware store and find a specialized product for removing gum.