The position of the Planet will not be the same when the "Projectile" will arrive. The Railgun must aim to the Destination the Planet will be. Fault tolerance will be a bigger issue than building a giant Railgun (Walmart maybe has one in stock already :P).