There are a number of store-bought products that do a good job of removing gum from carpets. ZenaFreeze does a fine job freezing gum for commercial applications. For household use, citrus-based cleaners like Goo Gone or a lacquer thinner aid with gum removal.