Upgrade to Rails4.
Fix deprecated config files, add new Rails 4 config options.