Gruber appears to have been instrumental in persuading Count Anton Apponyi to move the library from Vienna to Pressburg in the early 1820s, and remained Librarian of the Apponyi Public Library until 1833.