Baum had several failed careers behind him -- actor , salesman -- and it was Gage who encouraged him to write ; his wife , Maud , meanwhile , inspired the story of a sensible little girl in a land ruled by women .