Commenting on the opening verse of Parashat Noach, Rashi cites a famous dispute in the Gemara as to the meaning of the Torah's praise for Noach. The verse describes Noach as righteous "in his generation." The first view understands this term as emphasizing that were Noach to have lived in a more just and upright society, where he was not subject to the moral ills that characterized his lifetime, he would ascended to even greater spiritual heights. We must therefore read the verse as, "even in his generation" Noach was righteous. The second position, by contrast, understands the term as qualifying Noach's piety: "For his generation, he was righteous; were he to have lived in Avraham's generation, he would not have considered anything."
We may understand this second view in one of two ways. The first, perhaps more conventional interpretation, reads this position as simply pointing to the relativity of Noach's righteousness. Given the conditions under which he lived, he could not achieve a level that he could if he had lived among moral and ethical people. His piety paled in comparison with that of Avraham and other spiritual giants. If, however, he had lived in Avraham's time, he would have gained inspiration from the religious leaders and accomplished more. This is the approach taken by Rav Eliyahu Dessler, in his "Mikhtav Me-Eliyahu" (vol. 2, p.157). We should note that according to this explanation, the two views cited by Rashi do not argue at all regarding Noach's character. Both agree that he fell short of the greatness of later tzadikim but could have achieved that level if he had lived under more spiritually favorable conditions. The two views argue only as to what "in his generation" comes to add: his greatness considering the society in which he lived, or his inability to reach even greater spiritual levels.
Another interpretation appears in the "Levush Ha-ora," a work on Rashi's commentary to the Chumash. The Levush interprets this position as claiming that Noach would not have grown beyond his mediocre level of piety even were he to have lived among righteous men such as Avraham. Thus, whereas the first position Rashi cites maintains that Noach would have ascended to far greater heights in a more virtuous society, the second view feels that Noach would have remained the same no matter where and when he lived.
According to the Levush, then, Noach is criticized for living in a proverbial bubble of sorts, unaffected by his surroundings. Although his isolation saved him from the forces of corruption and perversion that swept the world during the pre-deluge era, it also did not allow him the opportunity to learn from the virtues of others. Difficult as it is, we are to live among others and learn from them, filtering out the bad and absorbing the good.