To buy rubies, open the Bank in the Rubies section by clicking the green "+" button next to the ruby counter on the top panel of the Main Screen.
You can switch between the Rubies and Coins sections of the Bank by clicking the flag with the coin in the center of the screen.