Devorim 33 (14) says
וּמִמֶּ֖גֶד תְּבוּאֹ֣ת שָׁ֑מֶשׁ וּמִמֶּ֖גֶד גֶּ֥רֶשׁ יְרָחִֽים׃
With the bounteous yield of the sun, And the bounteous crop of the moons;
Rashi says
גרש ירחים [AND BY] THE PRECIOUS THINGS PUT THINGS FORTH BY THE MOON — there are some fruits which the moon brings to maturity, these are cucumbers and melons (Sifrei Devarim 353:3). — Another explanation of גרש ירחים: this refers to fruits which the earth puts out and produces from month to month (cf. Onkelos).
Rashi's peshotim are difficult to understand.
1] The moon reflects light from the sun. So it seems unlikely that only the moon (and not the sun) will ripen cucumbers and melons.
2] The 2nd pshat seems to suggest that the earth produces different produce each Rosh Chodesh as Onkelos says, וְעָבְדָא מִגְדָּנִין וַעֲלָלָן מִיבוּל שִׁמְשָׁא וְעָבְדָא מִגְדָּנִין מֵרֵישׁ יְרַח בִּירַח:
So, two linked questions [1] What does the possuk mean and [2] can Rashi's peshotim be explained better?