I've been seeing a lot of threads on here recently asking how to slide rails. So here goes:
1) MOST IMPORTANT: make sure you are 100% comitted to getting the rail. If you know you can do it, there is a very good chance you will. This is the same when learning all new tricks.
2) Approach rail with some speed and a wide stance. Keep eyes on where you will land on the rail on your approach.
3)rotate solid 90 degrees on to the rail. It is important for your skis to be at a right angle with the rail, so you won't slide off to one side. Keep most of your weight on your forward (down hill) foot so that you don't fall backwards, and keep a wide stance for good balance.
4) When on the rail, keep your eyes focussed on where you will be landing.
5) Upon exiting the rail, rotate 90 degrees, landing either switch or forward. It probably will be easier for you to land switch at first.
If you don't get the rail first time, keep hiking and trying it until you do. Try and think about what mistake you made, and what you can do to correct it. Don't be afraid to expiriment. Like step #1, this applies to all tricks.
I hope this advice is helpful and you are pretzeling it up in no time!