I'm sure there are plenty of functional railgun demos that have been built, but the big issues probably fall into two categories: making them stable, sturdy and reliable and powering them.
Railguns are going to require some very high-tolerance engineering and control for the coils, and they're going to need to be very stable because if something gets a little out of kilter you may end up with a projectile that's not going quite straight and hits the rails. Rails holding the components imparting massive amounts of energy to projectiles are going to need to be very strong, and there's probably going to be a lot of waste energy (and heat) to be dissipated.
The other big factor is energy storage and transportation, the same thing that impacts gas, diesel and electric vehicles. Gunpowder and more advanced explosives have a really high energy density and can be refilled quickly; capacitors have relatively low energy capacity and ones capable of dumping the power required for a railgun within less than a second are going to be huge. It might be possible to deal with huge very short spikes of power demand in other ways, but nothing comes to mind right away except very careful sequencing of other power storage options most of which have higher ramp-up times than capacitors. I guess you could simply do massive battery arrays such that you could draw immediately from many at once, but those large arrays have their own problems ("large").