For it is not the hearers of the law who are righteous in God's sight, but the doers of the law who will be justified.
Romans 2:13
For me, the best version of this scripture is in The Message version of the Bible. If you are not familiar with The Message, its goal is to engage people in the reading process and help them understand what they read. It is not a study Bible, but rather "a reading Bible." The original books of the Bible were not written in formal language. The Message tries to recapture the Word in the words we use today. This excerpt from Romans 2 in The Message made this teaching clear to me.
God Is Kind, but Not Soft
You didn't think, did you, that just by pointing your finger at others you would distract God from seeing all your misdoings and from coming down on you hard? Or did you think that because He's such a nice God, He'd let you off the hook? Better think this one through from the beginning. God is kind, but he's not soft. In kindness He takes us firmly by the hand and leads us into a radical life-change.
If you go against the grain, you get splinters, regardless of which neighborhood you're from, what your parents taught you, what schools you attended. But if you embrace the way God does things, there are wonderful payoffs. God pays no attention to what others say (or what you think) about you. He makes up his own mind.
If you sin without knowing what you're doing, God takes that into account. But if you sin knowing full well what you're doing, that's a different story entirely. Merely hearing God's law is a waste of your time if you don't do what He commands. Doing, not hearing, is what makes the difference with God.
Linda Rines (2010)