John Gill's Exposition of the Whole Bible
Job 31:24
If I have made gold my hope,.... Job here purges himself from idolatry in a figurative sense, as he afterwards does from it, taken in a literal sense; for covetousness is idolatry, and a covetous man is an idolater; he worships his gold and silver, placing his affections on them, and putting his trust and confidence in them, Ephesians 5:5; for to make gold the object or ground of hope is to place it in the room of God, who is the Hope of Israel, and in whom every good man should trust, and whom he should make his hope, Jeremiah 14:8; not gold on earth, but glory in heaven, is what the good man is hoping for; and not riches, but Christ and his righteousness, are the foundation of such an hope; to make gold our hope, is to have hope in this life, and to make a thing present the object of it; whereas true hope is of things not seen and future, and if only in this life good men have hope, they are of all most miserable; but they have in heavens better and a more enduring substance, and a better ground for hope of that substance, than worldly wealth and riches can give:
or have said to the fine gold, [thou art] my confidence; as bad men do, and good men are prone unto, and therefore to be cautioned against it,
Psalms 49:6; for this is not only to trust in uncertain riches, and in unsatisfying ones, but to put them in the stead of God, who is or ought to be the confidence of the ends of the earth: not gold, but the living God, who gives all things richly to enjoy, is to be trusted in; when men covet riches, and trust in them as their security from evil, and that they may live independent of the providence of God, it is virtually to deny it, and carries in it secret atheism; as well as such a confidence is destruction of the worship of God, and such a temper makes a man an unprofitable hearer, plunges him into errors and hurtful lusts, and endangers his everlasting happiness, Habakkuk 2:9; in later times the Romans worshipped the goddess "Pecunia", or money, as Austin z relates.
z De Civitate Dei, l. 4. c. 21.