From the internet - seems reasonable:
Materials Needed:
rag
baking soda
white vinegar
vacuum
hot water
2 mixing bowls
Procedure:
Use the rag the scrub the spot soaked with gasoline.
In one bowl, mix some vinegar with hot water.
Create a baking soda solution in the other bowl.
Apply the vinegar solution on the affected areas of your carpet.
Dry the area using a rag or your vacuum cleaner.
Once done, apply the baking soda solution on your carpet.
Dry the area using a rag or your vacuum cleaner.
When your carpet dries, the gasoline smell will be gone.