Have you tried using the slime as a distraction for the rangers? Pack rats, skeletons, etc work too. Drop it above or below the rangers, so that when they fire your defenses aren't in the path of that arrow that goes through multiple defenses.
It's also helpful to use defenses that can be offset from the path that the ranger comes in on. Catapults are useless, but triballistas and lightning towers work nicely. If a ranger is coming in on one path, but the shooter is a tile above or below that path, it can shoot without being shot by the ranger until that ranger gets in line vertically with it. Perforators are great for putting in that tile where the ranger would be vertical to your shooter.