Migrated to rails 4 and fixed errors before deploy