Upgrade application to rails 4