>>1967702Old retired boomers are pretty into doing this, creating contraptions like pic related. Obviously you don't want to use them on active rail lines however, because you're very likely to get killed in an extremely brutal manner.
The boomers will use them on abandoned rail lines around the world. Link related -
https://www.youtube.com/watch?v=M8mhIdZoVow - shows some in Patagonia which is a really popular place. There are a lot of abandoned tracks to ride in the western United States of America as well. It's also a popular hobby in Russia, where sometimes they even use it as a semi-regular form of transportation by attaching small gas engines to them to go between villages or whatever.
There are also much larger railbikes which are more like tourist attractions, using rolling stock that is not really meant to be portable so they're really large and heavy as they just sit on the rails. But you can easily modify or build your own bike and even size it to different gauges (it's mostly just standard or narrow gauge though). Just look up "rail biking" on Google or YouTube to see some pictures and you can easily design your own bike so long as you have the tools to make it.
Again don't ride on the rails that are actually used or you'll end up dead, seriously.