I'm not sure of the context, but I believe that the metaphor is describing some kind of journey or path as a railroad. (Contrarily, it could also be that since railroads cannot ride people, the metaphor is comparing the railroad with the characterstics of something that could ride)