Try "painting" the back of the ruler with rubber cement heavily and let dry for a couple of hours. That will keep the ruler from sliding. Or, you can use the sandpaper dots mentioned by the others...but if like me, you're too frugal to buy them, you can just glue some 1" or so squares of sandpaper near the corners of your ruler.