I'm very sorry that I don't have time to look up the source of the old tshuvos at the moment.
There were poskim in early 20th century New York City who explored this issue, specifically in realation to the New York City subway.
Back then, the technically permissible way to ride the subway would have been:
Give a subway token to your friend, the non-Jew who works in your local station, on Friday.
Ask him to let you in (i.e. drop the coin in the mechanical turnstile) sometime on shabbos when you wanted to ride.
Going through the mechanical turnstile would be okay. The subway doesn't stop for you, it stops at every station, and there is no check-out process back then, or today, on the NYC subway.
(Whereas in San Francisco, Washington DC, and others - one is charged per stop, and must scan his ticket/card before AND after each ride)
Ultimately, the poskim in question chose NOT to publicize this discussion, for the obvious reason: people were likely to hear "riding the subway on shabbos is okay", and not take all the steps necessary - and consequently violate shabbos by carrying and by using a muktzeh subway token.
Today, there are even more problems. Using a Metrocard involves an actual melacha - using electricity, "building" a circuit, however you define the severity of turning on/off electricity on shabbos, it is a problem.
Asking a non-Jew to drop a muktzeh coin in a slot is much less problematic than asking him to slide a metrocard for you.
Then, the counter on the turnstile itself is also electronic! So, when you push through the turnstile, you are DIRECTLY "building" a circuit, and this is as much of a melacha as turning on an LED light would be.
This is all besides the point of "spirit of shabbos", "maris ayin" (What's a religious Jew doing on the subway on Saturday morning?), and other such concerns.
Bottom line: although the subway ride itself could theoretically be done without violating shabbos, there are too many factors today (and even back then) to permit it under any circumstances.
There is one circumstance where I have heard of a posek in our generation advising subway travel:
A young man in Brooklyn needed to be rushed to the hospital on a
Friday morning. The Rosh Yeshiva said that someone should accompany
him to the hospital.
(Having an advocate in the hospital is considered pikuach nefesh -
which is why someone can get into a car with a choleh she yesh bo
sakana, on shabbos)
The choleh, call him Reuven, and his chevrusa, call him Shimon, got
into the ambulance. For whatever reason, they were brought to a
hospital in Manhattan.
Reuven's family came to the hospital in Manhattan. They had already
decided to spend shabbos in the hospital, by his side.
It was now 90 minutes before shabbos. What should Shimon do? He was
no longer needed there as an advocate. Must he spend the whole
shabbos in the hospital?
He called his posek, who told him that he should empty his pockets,
leave his stuff with Reuven's family, take exact change for the subway
fare, and get on the train that would get him closest to home.
He entered the Manhattan station BEFORE shabbos. The train returned
him to Brooklyn after shabbos had already started. Again, because the
NYC subway doesn't require any check-out, he simply walked off the
train and walked home.
So in that very, very limited case, a shomer shabbos may ride the subway on shabbos.
Otherwise, as they say in Brooklyn....FUHGEDDABOUTIT! :-)