It may be tempting for some who know God to turn their back on the way of righteousness and follow the rest of the flock, but God warns those who do of dire consequences.
God says the last state will become worse for them than the first state. It would be better for them if they never knew God than if they did and then turn their backs on Him.
"For if, after they have escaped the defilements of the world
by the knowledge of the Lord and Saviour Jesus Christ,
they are again entangled in them
and are overcome,
the last state has become worse for them
than the first.
It would have been better for them
not to have known the way of righteousness,
than to have known it
and then to turn their backs
on the sacred command
that was passed on to them."
2 Peter 2:21 (NIV)
It may be difficult, but always stand up for the truth and God's righteousness, and loose friends rather than loose God.