I don't think railroad is the way to go here. We need war technologies now.
As for upgrades, in which city did you think about upgrading? Uxtmal doesn't need upgrades yet because longbows on hills are still pretty difficult to shaka's cuirassiers, so he will not attack amphibiously, giving us at least 1 turn to respond once he lands.
Our southern coastal cities need at least 1 additional units each because there is a danger he will attack amphibiously from his 2 galleons. I would send our new riflemen to those cities. Luckily he limits his galleons to 3 moves per turn because they are accompanied by caravels, so this gives us more time.
I think it's reasonable to upgrade the lone holkan defenders there, but I wouldn't do mass upgrades yet.
Also, there is a riflemen in the queue of each of the southern coastal cities. We can whip it for 3 or 4 population if he lands there.
I think it's reasonable to cut research to 0 this turn and build a little cash in case we need to do upgrades.
No reason to upgrade until we are at risk of an amphibious landing.
I like the arty tech path. It looks like we'll have difficulty here with Shaka having chem so I don't think we have any time to waste.
I think pigswill is up followed by mystyfly.