As a lv 9 Ronahn who regularly runs with a pack of rangers I have some advice to offer, as these Ranger spam threads are becoming quite common.
Everyone has a way to detect stealth units - also workers are detector units. If you are having an issue with Ranger spam there are a few things you can do:
Build a couple extra worker units and keep them in your blob of units, preferably in the middle to back so they can't be picked off so easy. Hide in fog and around corners with your army if you know where the Rangers are coming from. A worker will reveal them and you can make mince meat out of them!
Some additional units have a detection type ability - ironically Rangers have the detect ability but so do other units and buildings. So if you see a Ranger spam coming, make these units/build these buildings in places where the Rangers will be forced to either walk past or destroy - or go to a new area of the map. Either way you win because they are now revealed and you know where they are if they try to kill said building, they get revealed by said building or unit and you kill them. And forcing them to move to another part of the map gives your army a chance to take their points.
Set up an ambush! This has been done to me a couple times by crafty opponents - push the Rangers back, even if its just a arbitrary chase. Then place jump units or something with a charge/close ability in the nearest fog. Bait the Rangers with a Commander or throw away squad towards the fog and then engage. This is the hardest to achieve but it certainly can and has been done.