Update to rails 4.0.4

Closes https://github.com/rubygems/rubygems.org/pull/663.