You can get rubies by leveling up, completing certain quests, unlocking certain Achievements in the game, and for watching ad videos. You can also get rubies from guardian's cards and in the special Emerald Mystery event.

You can get rubies for linking your Facebook account, but only once.

You can purchase rubies at the Bank.