How was it that Naomi's two sons married non-Jewish Moabite women? From what I've read, it seems that Ruth only converted to Judaism after her husband died.
The biblical commentaries discuss the question that you ask, and they suggest different answers. Some are of the opinion that Ruth and her Moabite sister-in-law Orpah did not convert before marrying Naomi's two sons. According to this interpretation, these two men were guilty of intermarrying.
The Zohar Chadash maintains that Ruth and Orpah did convert before marrying. However, if this is the case, why did Naomi try to convince them both to return to their idolatrous families after the deaths of their husbands?
A conversion to Judaism is dependant on the sincerity of the one converting. During their husbands' lifetime, it was uncertain whether they observed Judaism out of a sincere desire to be part of the Jewish nation, or only to please their husbands. Naomi urged them to remain in Moab to test their sincerity. Orpah indeed remained, while Ruth, who always truly desired to be a Jew, insisted on traveling along to the land of Israel with her mother-in-law to live a Jewish life. Ruth abandoned the luxuries she had as a Moabite princess, readily prepared to become a pauper, out of a sincere love for G‑d.
And for this she was richly rewarded...
Click here to read more about Ruth.
All the best,
Rochel Chein for Chabad.org