 After studying Latin with an uncle who was a priest, at the age of 14 Ruiz López went to Madrid to study logic, physics, chemistry and pharmacology.He also studied botany at the Migas Calientes Botanical Gardens (now the Real Jardín Botánico de Madrid), under the supervision of Casimiro Gómez Ortega (1741–1818) and Antonio Palau Verdera (1734–1793).Ruiz had not yet completed his pharmacology studies when he was named the head botanist of the expedition.