Ramanujan spent his last days in Kodumudi (near his hometown in Tamil Nadu) after returning from England in deteriorating health. He died in Chennai (Madras) in 1920, but his final days were in Kodumudi. Erode was his birthplace, not where he spent his last days.