How could Boaz be required to do Yibbum with Ruth being that she was a non jew when she was married to?
Since all of Naomi's children had died, Ruth was free of the requirement of yibum and did not perform yibum with Boaz. Indeed, one of the reasons Naomi gave trying to convince Ruth and Orpah to leave her was that there would be no child available to perform yibum. Ruth 1:12 - 13
Return, my daughters, go, for I have become too old to marry, that I should say that I have hope. Even if I had a husband tonight, and even if I had borne sons,
Would you wait for them until they grew up? Would you shut yourselves off for them and not marry? No, my daughters, for it is much more bitter for me than for you, for the hand of the Lord has gone forth against me."