I was following Derek Elliot's car racing tutorial . I want to put a fence along the track. I have applied scale and rotation to the fence object and the array modifier is working fine but the curve modifier is not working. It generates the fence array separate from the track and both sides of the fence seem to be drifting away from each other. I have also attached a screenshot from the tutorial video to give an idea of what I want to generate  and what is being generated in my case [3,4]. I have also attached the blender files  for reference.
First, select the path and apply its Rotation & Scale with CtrlA, otherwise it will make your object rotate. Go in Edit mode and in the N panel, bring back its vertices radius to 1 to correct the applied scale (and Tilt to 0 unless you want one).
Put the object at the same position as the path's origin: Select the path, ShiftS > Cursor To Selected, then select the object, press ShiftS > Selection to Cursor.
In the Curve modifier, find the good Deformation Axis, which seems to be X.