Market forces are going to take care of the freight side of the railroads. Five buck a gallon diesel will mean about the only stuff shipped very far by truck will be cargo that will rot or die.
Look for the death of "Just in Time" manufacturing and stocking as businesses will be forced to carry more inventory to cover longer shipping times.
Passenger rail is another matter. Most people enjoy driving, and driving will be MUCH more enjoyable with fewer trucks on the road.
I'm buying some railroad stock.
The problem is that many have capacity problems, some tore up track after deregulation. UP in ol' hoghead's territory of west Texas, S. NM and lots of Arizona is still single track territory and congestion is blocking flow of goodsd. Can't pay a dividend on your stock if you're spending all your money on capital improvements.