The fuel rail sits near or at the top of your engine, right under the plastic cover usually. If you are smelling gas, I wouldn't look at the rail yet and check on your filter, it might just be leaking. Sometimes those things are a little tricky to put back in without the right tools. That or one of the hoses going to it are just loose and it is causing a small leak which is causing a loss of fuel pressure and causing your car to stall. Not all filters are directional, but if yours is there will be an arrow to indicate the direction of flow and the arrow should be pointing tword the engine bay.