Well there's rack railways[1] which are pretty close. I've been on one in India[2] and it was amazing, although a bit scary when (halfway up) one of our fellow passengers told us that one of the trains on that route had derailed and fallen into a ravine a few months prior, killing everyone on board...
[1] https://en.wikipedia.org/wiki/Rack_railway
[2] https://en.wikipedia.org/wiki/Nilgiri_Mountain_Railway