In 1864 the New Brunswick government passed the Railway Facility Act, which encouraged the building of railways by giving companies a subsidy of $10,000 per mile. The first railway company in the Fredericton area was the Fredericton Railway Company, of which Gibson was a director. It was incorporated in 1866 to build a line from Fredericton to the community of Hartt's Mills. When it opened in November 1867 it joined the Western Extension of the European and North American Railway which ran from Maine to Saint John, New Brunswick.