The Jataka, Vol. III, tr. by H.T. Francis and R.A. Neil, , at sacred-texts.com
"In lonesome forest," etc.—This story the Master at Jetavana told about a youth who was tempted by a certain coarse maiden. The introductory story will be found in the Thirteenth Book in the Cullanārada Birth 1.
Now in the old legend this maiden knew that if the young ascetic should break the moral law, he would be in her power, and thinking to cajole him and bring him back to the haunts of men, she said, "Virtue that is safe-guarded in a forest, where the qualities of sense such as beauty and the like have no existence, does not prove very fruitful, but it bears abundant fruit in the haunts of men, in the immediate presence of beauty and the like. So come with me and guard your virtue there. What have you to do with a forest?" And she uttered the first stanza:
’Tis easy there temptation to endure;
But in a village with seductions rife,
A man may rise to a far nobler life.
On hearing this the young ascetic said, "My father is gone into the forest. When he returns, I will ask his leave and then accompany you." She thought,  "He has a father, it seems; if he should find me here, he will strike me with the end of his carrying-pole and kill me: I must be off beforehand." So she said to the youth, "I will start on the road before you, and leave a trail behind me: you are to follow me." When she had left him, he neither fetched wood, nor brought water to drink, but just sat meditating, and when his father arrived, he did not go out to meet him. So the father knew that his son had fallen into the power of a woman and he said, "Why, my son, did you neither fetch wood nor bring me water to drink, nor food to eat, but why do you do nothing but sit and meditate?" The youthful ascetic said, "Father, men say that virtue that has to be guarded in a forest is not very fruitful, but that it brings forth much fruit in the haunts of men. I will go and guard my virtue there. My companion has gone forward, bidding me follow: so I will go with my companion. But when I am dwelling there, what manner of man am I to affect?" And asking this question he spoke the second stanza:
If to some village from this wood I stray,
Men of what school of morals, or what sect
Shall I most wisely for my friends affect?
Then his father spoke and repeated the rest of the verses:
Can trust thy word, and with thee patient prove,
In thought and word and deed will ne’er offend—
Take to thy heart and cling to him as friend.
To men capricious as the monkey kind,
And found unstable, be not thou inclined,
Though to some wilderness thy lot's confined.
Of angry serpent, or as charioteer
 Avoids a rugged road. Sorrows abound
Whene’er a man in Folly's train is found:
Consort not thou with fools—my voice obey—
The fool's companion is to grief a prey.
Being thus admonished by his father, the youth said, "If I should go to the haunts of men, I should not find sages like you. I dread going thither. I will dwell here in your presence." Then his father admonished him still further and taught him the preparatory rites to induce mystic meditation. And before long, the son developed the Faculties and Attainments, and with his father became destined to birth in the Brahma World.
The Master, his lesson ended, proclaimed the Truths and identified the Birth:—At the conclusion of the Truths the Brother who longed for the world attained to fruition of the First Path:—" In those days the young ascetic was the worldly-minded Brother, the maiden then is the maiden now, but the father was myself."
311:1 No. 477, Vol. iv.
312:1 This stanza and the first seven of the following verses are to be found in No. 348 supra.