A search for neutrino-induced muons in correlation with a selection of 40 gamma-ray bursts that occurred in 2007 has been performed with the ANTARES neutrino telescope. During that period, the detector consisted of 5 detection lines. The ANTARES neutrino telescope is sensitive to TeV--PeV neutrinos that are predicted from gamma-ray bursts. No events were found in correlation with the prompt photon emission of the gamma-ray bursts and upper limits have been placed on the flux and fluence of neutrinos for different models.