In what initially seems to be shocking statement, Jesus says that if we want to have eternal life, we must follow the commandments in the Old Testament. [Matthew 19:17]
Of course, this is impossible, because if we break even one law, one time, we are found guilty and therefore separated from God. Clearly, following rules is not the solution.
So what is? The realistic answer is that we need to turn from our wrong-doing and follow Jesus by faith, who took the hit for our law-breaking, making us right with God. Even Abraham, was made right with God through his faith, not by following a bunch of rules. [Galatians 3:6]
For further contemplation, this contrast between the law (following rules) and faith (following Jesus) is expanded upon and explained in greater detail in Galatians 3, especially verses 10-11,19, and 21-22. Also see Ephesians 2:8.