And are you sure its gape in the first place? There are a few other more common problems that should be considered first like heat stress, or possibly a respiratory infection.
Ivermectin does not treat gapes according to a couple of studies I have read. If you want to treat gapeworms, use Safeguard or Valbazen
Safeguard - 0.14 ml per pound for 5 consecutive days.
Valbazen - 0.08 ml per pound for 3 consecutive days.
Could you post a video?