Engine light

I smell gas sometimes. check engine light has come on.could it be as simple as new gas cap???

Have your codes read at a large auto parts store and find out for sure. No use throwing parts at a problem before the cause is known.