1 Tim. 6:17-21 (ESV)
As for the rich in this present age, charge them not to be haughty, nor to set their hopes on the uncertainty of riches, but on God, who richly provides us with everything to enjoy.  They are to do good, to be rich in good works, to be generous and ready to share,  thus storing up treasure for themselves as a good foundation for the future, so that they may take hold of that which is truly life.
 O Timothy, guard the deposit entrusted to you. Avoid the irreverent babble and contradictions of what is falsely called "knowledge,"  for by professing it some have swerved from the faith.
Grace be with you.
There is nothing wrong with being rich, but there is something wrong with trusting in riches. The advice Paul offers here is not only for the rich, but those who are not also. Trusting in riches is something everyone is tempted to do, rich or not. But we should set our hopes on God who gives us everything to enjoy. We can enjoy those blessed gifts that God has given us. In fact, we should enjoy the gifts God has given to us: family, friends, food, drink, toys, etc. God has given us life, life itself is a gift we should enjoy as often as possible. Not in a way that abuses the life God has given us, but enjoy it nonetheless. I sometimes think that Epicurus had it right, pagan though he was. That moderation is actually the key to enjoying life. Though, he, unlike Christ, could give no reason to enjoy life. It is hard to enjoy life knowing that tomorrow all is gone with death. Christ has given us life eternal. In Christ we do not die but live! We live because he lives, and we have died in him. Death for us is not the end of all enjoyment, but the door to unsurpassable joy in heaven.
This is the deposit entrusted to Timothy, and all pastors that should be guarded. Pastors should avoid all the irreverent babble of false doctrine, Gnosticism and so forth. We have the gospel, that Christ died so we may live! False doctrine is not a light matter, through it people swerve from the faith all together, and lose the deposit entrusted to them, the treasure for us.