Right-click on the space just above/below the sample display (where you see the actual ruler itself) and you will find a menu to choose the ruler type. It’s possible to choose a ruler based on the sample offset effect (09xx), beats, individual samples, and time in minutes. I don’t think there’s actually a shortcut key to change or hide the ruler, though.
If you don’t have a sample loaded then the ruler becomes invisible since there’s no sample data to work on. (Sorry if this is ridiculously obvious, but I thought I’d mention it just in case)
Another thing to keep in mind is that if the sample itself is very short (less than 1 beat for example) then it can simply appear that there is no ruler, because the spacings/markings will be so far apart in comparison to the very short sample length.