Ruler bar disappears; show ruler option also grayed out

My ruler bar seems to disappear randomly and the option to turn it on is grayed out in the drop-down menu. Tried using CMD-R but that doesn’t do anything either. What did I do wrong?

The ruler can only be toggled on in editable rich text fields (the main editor and Document Notes sidebar are two examples of that, the synopsis card in the Inspector is not, since that is just a regular simple text field). Because multiple areas of the window can have the ruler toggled, you need to tell the software where to put it, by clicking into the text view first.