Reordering Train Cars solutions

Reordering Train Cars was solved using Ruby by 19 contestants. Solution sizes: average 2340 bytes (shortest: 987; longest: 3783).

The list below is sorted by solution size. You can also sort by ranking.