I think there is a bug with bigger than default ship size rail guns. I noticed that my ship rail gun refused to fire even if it's already in range. and I also noticed that smaller railguns have better range than mine. in the screenshot, that's the approximate range when my rail guns start to fire. notice that the it should fire from further distance according to the UI.
It's version 0.14.10