סימן צה סעיף י
צָרִיךְ שֶׁיְהֵא הָעֵרוּב מֻנָּח בְּמָקוֹם שֶׁאֶפְשָׁר לְאָכְלוֹ בֵּין הַשְּׁמָשׁוֹת, בְּלִי עֲשִׂיַּת אִסּוּר דְּאוֹרָיְתָא. וְלָכֵן אִם הִנִּיחוֹ בְּגוּמָּא וְכִסָּהוּ בְּעָפָר, לֹא הֲוֵי עֵרוּב. כִּסָּהוּ בְּאֶבֶן הֲוֵי עֵרוּב. נְתָנוֹ בְּאִילָן, אִם הָאִילָן קָשֶׁה הֲוֵי עֵרוּב. הִנִּיחוֹ עַל אִילָן אוֹ קָנֶה רַךְ, אֵינוֹ עֵרוּב (סִימָן ת"ח וּבְחַיֵּי אָדָם).
The eiruv must be deposited in a place where it can be eaten on Friday at twilight without violating a prohibition of the Torah.28But a Rabbinic prohibition is permitted at twilight for the purpose of doing a mitzvah or in extenuating circumstances, and therefore does not preclude the validity of the eiruv. See Shulchan Aruch 409: 2. Therefore, if you placed it in a hole in the ground, and covered it with dirt, the eiruv is not valid. If you covered it with a stone, the eiruv is valid. If you put it in a tree, if the tree is strong, the eiruv is valid. If you put it on a soft tree or a reed the eiruv is not valid.29Because it will almost certainly break off and then it would be a de’oraisa violation. [Magid Mishnah]
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)