Because of his association with Republicanism and Catalan nationalism, he was compelled to flee to Montpellier, France, after the victory of Francoist forces at the end of the Spanish Civil War in 1939.
In 1943 he returned to Barcelona, working on translations from classical authors for the Fundació Bernat Metge, of which he eventually became director.
He wrote poetic works including Estances (1919 and 1930), Bierville Elegies (Les Elegies de Bierville) (1943), Salvatge Cor (1952), Del joc i del foc (1947), and Esbós per a tres oratoris (1957), as well as translations of Constantine Cavafy, Friedrich Hölderlin, Edgar Allan Poe, Rainer Maria Rilke and Franz Kafka, and classical works including Homer's Odyssey, Plutarch's Parallel Lives, and dramas by Sophocles and Euripides into Catalan.
Riba's work has been translated into English by Joan Gili and Pearse Hutchinson.
The famous American critic Harold Bloom included Riba's poetry in his selection of the Western canon.