Rough idle, gas smell

My first suspect based on the symptoms would be a leaking fuel pressure regulator unless that is what you mean by a gas valve.