You can get rubies:

- by leveling up
- by completing certain quests
- by unlocking certain Achievements in the game
- by watching video ads
- from guardian cards
- in the special Emerald Mystery event.

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

Furthermore, you can purchase rubies at the Bank.