Rubies are a semi-rare ore that can be mined in caves and/or obtained from Giftboxes, along with the Gambling Totem. They can be used to create Altars with a Large Building Plot, and a Building Plot Maker. If you are lucky enough to get enough later in the game, you can also make MaxHunger Potions at an Alchemy Table.