Upgrade to rails4