[1] Aside from his classical formation for the priesthood, his interests ranged across agriculture, architecture, astronomy, engineering, hydrology, physics, chemistry and art.
Having moved to Russia, where Vatican law did not apply, he was welcomed at the Court of Catherine the Great as an engineer and saw there an opportunity to resume his ministerial career among his exiled Jesuit brethren.
At the same time, he was the architect and builder of the Gruber Palace — a vast rococo edifice which was originally his mansion — used for his research in physics and hydraulics.
After the Suppression of the Society of Jesus by Pope Clement XIV, in 1773, Gruber remained as engineer at the court of Emperor Joseph II until 1784.
In 1785, Gruber went to Polotsk, a border city between the Polish–Lithuanian Commonwealth and the Russian Empire to rejoin the Society of Jesus and became a member of the Jesuit community in Russia.
He was influential in the court of Catherine the Great, and was close to her son and successor Tsar Paul I, at whose request he reorganized the technical training in the whole Russian empire.
[1] In 1797 he officially became the Assistant of Kareu and ultimately, after the death of the later, Gruber was elected Superior General of the Society of Jesus in Russia, at the Regional (Polotsk) Congregation IV of 1802.
That was just a few months after Pius VII had issued the brief Catholicae fidei (1801), giving approval to the existence of the Russian Jesuits and making the Temporary Vicar (Franciszek Kareu) 'Superior General for Russia'.
[1] Plans were afoot to send an overland mission to China when Gruber died from smoke inhalation from an accidental fire at his Saint Petersburg residence on April 7, 1805.