The host galaxies of long gamma-ray bursts