The time of the Judges was circa 1375 to 1050 B.C. According to my NIV Study Bible notes:
The author is unknown. Jewish tradition points to Samuel, but it is unlikely that he is the author because the mention of David (Ruth 4:17, 22) implies a later date. Further, the literary style of Hebrew used in Ruth suggests that it was written during the period of the monarchy.
Regardless, the answer to your question is that famine does not seem to have been uncommon in that area of the world. Indeed, famine is mentioned as far back as 2100 B.C. when Abram had to move to Egypt because of famine (Genesis 12:10). Further on in time, when Jacob lived in the land of Canaan, there was a great famine and, eventually, Joseph’s brothers travelled from the land of Canaan to buy food (Genesis 42:1-7). That was approximately 1880 B.C.
During these Old Testament times famine was usually the result of drought. Swarms of locust were also not unheard of. Sometimes these pestilences were brought about as divine judgment:
Be glad, O people of Zion, rejoice in the Lord your God, for he has given you the autumn rains in righteousness. He sends you abundant showers, both autumn and spring rains, as before... I will repay you for the years the locusts have eaten... my great army that I sent among you (Joel 2:23-25).
Apart from the famine during the life of Ruth, a severe famine struck the inhabitants of Samaria (1 Kings 17:1; 18:2). This was caused by the supernatural withholding of dew and rain as prophesied by Elijah. This drought was a divine judgment on a nation that had turned to idolatry. It demonstrated the impotence of the god Baal, who was lord of the rain clouds and the god of fertility.