Sahih al-Bukhari, Book 54, Hadith 11 (In-Book)

Narrated Rafi` bin Khadij: We used to work on the fields more than the other Ansar, and we used to rent the land (for the yield of a specific portion of it). But sometimes that portion or the rest of the land did not give any yield, so we were forbidden (by the Prophet ) to follow such a system, but we were allowed to rent the land for money.

حَدَّثَنَا مَالِكُ بْنُ إِسْمَاعِيلَ، حَدَّثَنَا ابْنُ عُيَيْنَةَ، حَدَّثَنَا يَحْيَى بْنُ سَعِيدٍ، قَالَ سَمِعْتُ حَنْظَلَةَ الزُّرَقِيَّ، قَالَ سَمِعْتُ رَافِعَ بْنَ خَدِيجٍ ـ رضى الله عنه ـ يَقُولُ كُنَّا أَكْثَرَ الأَنْصَارِ حَقْلاً، فَكُنَّا نُكْرِي الأَرْضَ، فَرُبَّمَا أَخْرَجَتْ هَذِهِ وَلَمْ تُخْرِجْ ذِهِ، فَنُهِينَا عَنْ ذَلِكَ، وَلَمْ نُنْهَ عَنِ الْوَرِقِ‏.‏

sunnah.com