According to Wikipedia...

1808 - The Kilmarnock and Troon Railway was the first railway in Scotland authorised by Act of Parliament and the first in Scotland to use a steam locomotive.

...which would of course need rails, spikes and ties. So the timing is about right. Huh. Interesting.