My frosted Olfa rulers don't move, but on my slippery rulers, I either use a little basting spray, or a Zig 2-way glue pen. I discovered it when mounting photos to wedding invitations, and love that it can be permanent, or temporary (like a post-it note). It will also peel off of a ruler quite easily if you wish to remove it. Here's a demo:
https://www.youtube.com/watch?v=B7ggt24Zm0Y