Rail Guns seem to have hit a technological dead-end. The Navy specified how many “shots” they required for the life of the rails and the prototypes are far, far below the specification. A half-way realistic fire-mission would wipe out “the barrels” (as it were). Not practical.
One alternate approach would be to have the part of the rail which experiences wear be able to be quickly swapped out.
Alternately, the power that would be used by a railgun, could also be used by a laser, and high power lasers are coming along.