It's a really easy, cheap, and effective way to make a rail.
1. Make your rail support like whatever. Just something to put the sliding material on.
2. Stack two 2x4's on eachother and put it on top of the rail support.
3. Get a plastic, or maybe even metal, gutter and put it on top of the 2x4's.
4. Screw the sides of the gutter to the sides of the stacked 2x4's.