get back on the rails—successfully recover from adverse situation, etc.:
- Bob Taft’s campaign got back on the rails in last week’s primaries. One victory came in Wisconsin…
go off the rails —(also: run off the rails) start behaving in a way that is not acceptable:
- Returning to the U.S., he is disowned by the CIA, which portrays him as a rogue agent who went off the rails.