I've done this, and actually prefer to use a glass bubble for rails. A little less risky, IMHO. Especially for beginners; there's less chance of scorching liquid shooting down your delicate nares...or actual flames, no joke.
Torch the end of the pipe you usually smoke from (tube end), and when it's hot enough, proceed as usual -- except press your nostril to the little hole on the top of the bubble and inhale from there.
I recommend giving it a dry run or three first, so you know just where it needs to go to make a good seal with your nose (quickly), and if you're just comfortable with it in general.
In short: Bubble end up to your nostril, tube end heated and chasing the line.
The angle this creates before your stuff hits your nose can literally save you from excruciating pain and even disfigurement. Harm reduction at its best!
Have fun ridin' the rails!