Water, wind, or animal power, either directly, or pulling some kind of cable to chain that the cars can latch on to.
As those who know anything about San Francisco's cable cars can tell you, the gearing can get very complicated, so you can definitely hand-wave that.