Genesis 2:4-5 does NOT state that there was no rain until the time of Noah. It simply states that before man was created, rain had not yet been sent.
NIV translation
"4 This is the account of the heavens and the earth when they were created, when the Lord God made the earth and the heavens.
5 Now no shrub had yet appeared on the earth[a] and no plant had yet sprung up, FOR (or because)the Lord God had not sent rain on the earth and there was no one to work the ground, 6 but streams came up from the earth and watered the whole surface of the ground. 7 Then the Lord God formed a man from the dust of the ground and breathed into his nostrils the breath of life, and the man became a living being."
No need for it to rain until Adam was there a few days later.