An apparatus for applying adhesive to both ends of each of a pair of rails for adhesive attachment to posts for example of a door includes a support head with two channels and center fence for supporting the rails in parallel position for presenting the ends side by side vertically upwardly to an adhesive applicator head with a nozzle guided by a three axis movable support. The support head is rotatable through 180 degrees about a transverse axis so as to present the other ends and there is provided a drive system defined by set of drive rollers for driving the rails up to an end stop position at which the presented ends are at the adhesive applicator head. A laser sensor detects the end profile to ensure that the adhesive pattern matches a preselecteci required layout and to ensure no contact between the nozzle and the profile.