If there was a 2" gap between the end edge and a bottom rail, I'm pretty sure someone could make it into a law suit by saying they got their toe caught and fell. Like others have stated I tend to see the railing fastened to the side of the stringer or concrete with the handrail over the tread edge.
OSHA - Hole means a gap or void 2 inches (5.1 cm) or more in its least dimension, in a floor, roof, or other walking/working surface.
1926.502(i) "Covers."
Covers for holes in floors, roofs, and other walking/working surfaces shall meet the following requirements:
1926.502(i)(1) Covers located in roadways and vehicular aisles shall be capable of supporting, without failure, at least twice the maximum axle load of the largest vehicle expected to cross over the cover.
1926.502(i)(2) All other covers shall be capable of supporting, without failure, at least twice the weight of employees, equipment, and materials that may be imposed on the cover at any one time.
1926.502(i)(3) All covers shall be secured when installed so as to prevent accidental displacement by the wind, equipment, or employees.
1926.502(i)(4) All covers shall be color coded or they shall be marked with the word "HOLE" or "COVER" to provide warning of the hazard.