Yes - in our Megastructure for our future Advanced Civilisation
A dyson swarm is a series of interconnected space habitats (or artificial satellites) that orbit a star, capturing its energy and utilising it to sustain a civilisation. Such a swarm is for an advanced civilisation, possibly using AI and self-replicating robots to create large structures.
It is easy to see that the creation of such a megastructure may require transport of raw materials in an orbital fashion without the constant use of rockets and propellant, for both its manufacture and maintenance.
Rockets could be problematic. If much material needs to be accelerated and decelerated using propellant, after such a massive amount of material is transported, the propellant gases and energy required would be enormous.
In contrast, an orbiting ring or cable (ie. Your Rail), could be used to transport goods and material using acceleration and deceleration of the material (ie. Your Train) with no expenditure of combustible gases. The ring would be on an orbital path, so there would be little to no lateral forces on it. The movement of people, food, construction material, and other items could be containerised and move along the rail between satellite habitats. Containers moving on a ring in opposing directions would prevent the rail from rotating.
Over time, it may indeed be possible for the rails themselves to become ideal, habitable areas.
Rails could overlap too, to create a three dimensional ring structure, like this:
Such a structure could actually harness completely the energy of a star, and provide for a complex internodal network of intersecting railcars and trains, without the constant unsustainable use of expendable propellent.
If you create a story in such a setting, I would definitely read it!