Updated to rails 4