Learning how to rail