JC Ryle was an Anglican Bishop in the 1800s. In his Expository Thoughts on the Gospel of Mark he writes the following, in commentating on Mark 7:20-23, about the dangers of thinking our children will be safe and turn out godly if we just put them in the right environment:

We see…from this passage, that the heart is the chief source of defilement and impurity in God’ sight.

We ought to remember this in the training and education of our children.  In all our management we must never forget that the seeds of all mischief and wickedness are in their hearts.  It is not enough to keep boys and girls at home and shut out every outward temptation.  They carry within them a heart ready for any sin, and until that heart is changed they are not safe, whatever we do.  When children do wrong it is common practice to lay all blame on bad companions.  Bad companions are a great evil no doubt, and an evil to be avoided as much as possible.  But no bad companion teaches a boy or girl half as much sin as their own hearts will suggest to them, unless they are renewed by the Spirit.

The Beginning of all wickedness is within.  If parents were half as diligent in praying for their children’s conversion, as they are in keeping them from bad company, their children would turn out far better than they do.*

* The common argument against “public school” education, appear to me based on forgetfulness of our Lord’s teaching about the heart.  Unquestionably there are many evils in “public schools,” however carefully conducted.  It must needs be so.  We must expect it.  But it is no less true that there are great dangers in private education, and dangers in their kind quite as formidable as any which beset a boy at public school.  Of course no universal rule can be laid down.  Regard must be had to individual character and temperament.  But to suppose, as some seem to do, that boys educated at public schools must turn out ill, and boys educated at home must turn out well, is surely not wise.  It is forgetting our Lord’s doctrine, that the heart is the principle source of evil.  Without a change of heart a boy may be kept at home, and yet learn manner of sin.