Gurb in the 19th century was a small village. There were only three roads that crossed the village: the Vich-Olot road, Ribas Barcelona road that goes to Ripoll and the road to St. Bartomeu del Grau.
A coal mine was created in St. Joan de les Abadesses, but it was of poor quality. In 1875 they built a railway that its line was: Barcelona → Vic → Ripoll → Sant Joan de les Abadesses. It was mainly used to export the coal that was extracted from the Sant Joan de les Abadesses mine.
All this causes a great change in the society since it allowed the different cities to communicate with each other and they were able to transport coal and other things. Since Gurb is next to Vic, a lot of people from the railway come to Gurb.