Here's a guide that will walk you through it using all freeware:
http://www.pocketmatrix.com/guides/dvd2divx/
FairUse is an all-in-one app that will do it too.
Pocket DVD Studio is my favorite app but it's not free.
It lets you edit the start and stop points which is good for cutting out the credits to make the file even smaller.
PocketDVD is an other commercial (not free) app that some people have had luck with.
I didn't like it but it does give you a fully functioning 5-day trial.