Upgrade to rails4 and update configuration files accordingly.