Upgrade Rails to 4.0.4

[Finishes #66011984]