Both rubies and emeralds are minerals, which is a type of rock with ... aluminum in the corundum or beryl crystal when a ruby or emerald forms underground at a high temperature and pressure.