While researching the issue of the obligation to be a nice person, the question occurred as to how does one understand the concept of me'urav im habrios. We see here in Kesubos it means that one should even lie so as not to upset others. The Rambam (Hilchos De'os 6:1) presents it as an inherent property of human nature to be like others and thus one should be careful in selecting one's friends. Such an idea seems to be diametrically opposed to the gemora's understanding. I would appreciate some discussion - especially with relevant texts.
update Toldos Yitzchok (Bereishis 37:2-3): Our Sages say that a person should not stand when everyone else is sitting nor should he sit if everyone else is standing. He should not be sad when everyone else is happy nor should he be happy when everyone else is sad. Rather a person should always have the attitude to do what everyone else is doing (Kesubos 17a). We see also that Yosef acted self‑centered and conceited when he was with others who were that way. He acted as an immature adolescent when he was with other adolescents and as a wise man when he was with other wise men. Thus when he was with his conceited brothers who were the sons of Leah he would supervise and direct them and dominate them. In contrast when he was with the sons of Bilah and Zilpah he would act immaturely and be concerned with his hair. We also know that his father loved him more than any of his brothers since he was the son of old age. In other words he acted as if he were a comrade of his father – he behaved with the wisdom and maturity of his father
update Avodas HaMelech (Hilchos De’os 6:1): It is an inherent characteristic in man to be drawn after the views of others….and to act like others in society. Look at Derech Eretz Rabba (end of chapter 7), The general principle is that a person should not be different than his comrades and other members of society. Thus it states in Kesubos (17a), The attitude of a man should always be to get along and fit in with other people. The Migdal Oz alludes to this. It also says in Shemos Rabba (47:5), If you go to a city, you must act according to their customs.[Moshe did not eat or drink when he was in Heaven while the angels ate and drink when they descended to earth]
update Toldos Yitzchok (Bereishis 37:2-3): Our Sages say that a person should not stand when everyone else is sitting nor should he sit if everyone else is standing. He should not be sad when everyone else is happy nor should he be happy when everyone else is sad. Rather a person should always have the attitude to do what everyone else is doing (Kesubos 17a). We see also that Yosef acted self‑centered and conceited when he was with others who were that way. He acted as an immature adolescent when he was with other adolescents and as a wise man when he was with other wise men. Thus when he was with his conceited brothers who were the sons of Leah he would supervise and direct them and dominate them. In contrast when he was with the sons of Bilah and Zilpah he would act immaturely and be concerned with his hair. We also know that his father loved him more than any of his brothers since he was the son of old age. In other words he acted as if he were a comrade of his father – he behaved with the wisdom and maturity of his father
update Avodas HaMelech (Hilchos De’os 6:1): It is an inherent characteristic in man to be drawn after the views of others….and to act like others in society. Look at Derech Eretz Rabba (end of chapter 7), The general principle is that a person should not be different than his comrades and other members of society. Thus it states in Kesubos (17a), The attitude of a man should always be to get along and fit in with other people. The Migdal Oz alludes to this. It also says in Shemos Rabba (47:5), If you go to a city, you must act according to their customs.[Moshe did not eat or drink when he was in Heaven while the angels ate and drink when they descended to earth]
Kesubos(17a): Beis Hillel said to Beis Shammai, Someone who made a bad purchase in the market, should one praise it in his eyes or deprecate it in his eyes? Surely one should praise it in his eyes! From here our Sages say that the attitude of a man should always be to get along
and fit in with other people [me’urav im habri’os].
Rambam(Hilchos De'os 6:1) [translation Rabbi Tougher] It is natural for a man's character and actions to be influenced by his friends and associates and for him to follow the local norms of behavior. Therefore, he should associate with the righteous and be constantly in the company of the wise, so as to learn from their deeds. Conversely, he should keep away from the wicked who walk in darkness, so as not to learn from their deeds.
Rambam(Hilchos De'os 6:1) [translation Rabbi Tougher] It is natural for a man's character and actions to be influenced by his friends and associates and for him to follow the local norms of behavior. Therefore, he should associate with the righteous and be constantly in the company of the wise, so as to learn from their deeds. Conversely, he should keep away from the wicked who walk in darkness, so as not to learn from their deeds.
This is [implied by] Solomon's statement (Proverbs 13:20): "He who walks with the wise will become wise, while one who associates with fools will suffer." Similarly, Psalms 1:1 states: "Happy is the man who has not followed the advice of the wicked."
A person who lives in a place where the norms of behavior are evil and the inhabitants do not follow the straight path should move to a place where the people are righteous and follow the ways of the good.
If all the places with which he is familiar and of which he hears reports follow improper paths, as in our times, or if he is unable to move to a place where the patterns of behavior are proper, because of [the presence of] bands of raiding troops, or for health reasons, he should remain alone in seclusion as [Eichah 3:28] states: "Let him sit alone and be silent."
If they are wicked and sinful and do not allow him to reside there unless he mingle with them and follow their evil behavior, he should go out to caves, thickets, and deserts [rather than] follow the paths of sinners Jeremiah 9:1 states: "Who will give me a lodging place for wayfarers, in the desert."
A person who lives in a place where the norms of behavior are evil and the inhabitants do not follow the straight path should move to a place where the people are righteous and follow the ways of the good.
If all the places with which he is familiar and of which he hears reports follow improper paths, as in our times, or if he is unable to move to a place where the patterns of behavior are proper, because of [the presence of] bands of raiding troops, or for health reasons, he should remain alone in seclusion as [Eichah 3:28] states: "Let him sit alone and be silent."
If they are wicked and sinful and do not allow him to reside there unless he mingle with them and follow their evil behavior, he should go out to caves, thickets, and deserts [rather than] follow the paths of sinners Jeremiah 9:1 states: "Who will give me a lodging place for wayfarers, in the desert."