Gomer rolls from Mayberry into the Marines ("Gomer Pyle, U.S.M.C.," Episode #107). Through the able assistance of Gunnery Sgt. Vincent Carter, Gomer becomes a highly presentable soldier.
And through a series of events, Gomer eventually finds his way from boot camp in Wilmingtion, N.C., to his station in California.
By the way, Gomer learns that his metal bucket is great for either singing or thinking when he wears it on his head.