Well, in the comics, they actually had enough time, in the prison, to grow a garden. That's where Hershel's knowledge was key for their survival. In the show, they just talk about a garden, then start fucking around with the governor, and never grow shit.