He was a promising student but he 'went off the rails' after he started taking drugs.
The train went off the 'rails'. = ('chiefly Brit') The train jumped the 'rails'.
The workers 'railed' about the unfair treatment they'd received.
(..) They need a purpose, a focus. Who knows what'll happen? I know what will happen. You'll rev them up with some new and exciting idea, then you're gonna go off the rails, and we're not gonna see you again. They don't need some big, delusional tournament. They don't even have parents. (..)2014 The Dark Horse