Move your mouse cursor and ruler will follow it. Close the ruler using ESC key or use the button on the left side with RULER ICON.