“A righteous person.” The Hebrew text reads, “A righteous,” using the adjective “righteous” as a substantive, describing something righteous, for example, “a righteous person.” There are scholars (cp. Bruce Waltke) who believe that the phrase refers to God, and thus the right way to translate the substantive is by supplying the word “One” and understanding the phrase as if it started with the definite article: “The Righteous One.” They assert that it is God who keeps an eye on the activities of mankind and has the power to bring wicked people to ruin. That is true, and although many wicked people seem to escape being ruined in this life, no one will escape the Day of Judgment.
However, many scholars believe that if the verse were referring to God, the definite article “the” would have been supplied in the text, and it would have said “the righteous” instead of “a righteous” (cp. Fox), or the phrase would have been written differently. God expects rulers and those in power to protect good and godly people and find ways to get rid of, or limit the influence of, evil people. Righteous people do not let evil go unnoticed or unchecked. The righteous “keep an eye on” (definition in HALOT Hebrew-English lexicon) the wicked with a view to bringing their wickedness to an end.
“ruin.” The Hebrew is more literally, “evil,” thus, “bringing the wicked to evil,” but the idea is the ruin of the wicked.