Like others have said. Commit, pop off the lip, make sure you turn all the way 90, put your skis should width apart, bend your knees a bit and relax. (if you're having trouble getting completely sideways, throw your spin a little more and think of coming off switch.) Make sure you get it dialed on small features before taking it to bigger ones. Technically, rails are easy. You just have to win the battle with you mind to commit. Also, if you hit a feature, do it right. Many people hit boxes and develop bad habits on them because they get lazy. Practice doing it right on boxes so that when you do rails, it will already be in your head.
Also, be sure you have 180s dialed. That will help you get your spin right.