Several more fixes to updated rails version.