"Saying "get fitter" is a bit chicken and egg isn't it? If the op gets cramp on longer rides, then how is he supposed to ride more to get fitter without getting cramp?"
It's not chicken-and-egg, it's about learning where it starts to kick in.
To avoid it being chicken-and-egg, ride harder on shorter distances (ie make the muscles burn when you know you're in no danger of getting cramp otherwise), and take it easier - particularly at the start - on longer distances (ie go further and longer than currently causes cramp, but slower). And when you do get cramp, learn the right balance between easing off to keep going and just pedalling through the pain until it stops.
When I get back from a decent (either long or fast) road ride my legs tend to pulsate, as if they're crawling with loads of big maggots under the skin; this seems to be the stage before cramp. Finishing a ride like that every time seems to push the cramp envelope out a little, without actually causing cramp. Important to get some fluid down once you're back home in that state, though, otherwise you risk waking up in the middle of the night with a hamstring trying to rip its own leg off.
(All the above is just IME and from extensive trial and error - I'm no expert, but I have suffered a *lot* from cramp in the past.)