This idea was inspired by "war weapon", a now-deleted idea posted by some Magyverphile which suggested that all household items have approved alternative uses as weapons, in case there were a war and the soldiers ran out of conventional weapons.
Conventional guns shoot bullets or shells. Generally
the ammo itself contains the propulsive material, as well as the payload. If the gun could confer the propulsive energy, the bullets could be made smaller - this was the case with the old blunderbuss type guns, which were loaded with powder and projectile seperately. Ammo is meant to conform to the barrel, confining the expanding gases behind it to maximize their propulsive force. If the barrel could confirm to the silhouette of the projectile, any ammo could be used.
I propose that military railguns be designed with barrels made of multiple adjacent steel rods. When the magnet is off, these rods could be adjusted so that the barrel was the same shape as the projectile placed in it. With the magnet on, the barrel would become rigid. I know there are no expanding gases in a railgun, but this would help keep the nonstandard ammo on the rails.
Additionally helping with this project would be the reintroduction of wadding, another blunderbuss era invention. Here the wadding would be steel foil. Wrapped and crumpled around the projectile this would allow nonferrous / magnetic objects to be fired from the RailBlunderbuss.
The result: a weapon that can live off the fat of the land. I envision the smaller weapons might fire rocks, dead animals, glass bottles of urine, etc. The larger might accomodate shopping carts, car tires, mannekins, and other handy objects one might find around the war.
I think that the best application of such a weapon would be in a cartoon, where the visual effect of the varying ammo types would be most impressive.