"If any of you lacks wisdom, he should ask God, who gives generously to all without finding fault, and it will be given to him." NIV translation
Now, James refers to wisdom which is the knowledge of how to follow Christ in our daily lives. He reminds us that this wisdom comes from God through prayer and is not something that we can do on our own. The good news is that God "gives generously" when we ask for this wisdom.
"But when he asks, he must believe and not doubt, because he who doubts is like a wave of the sea, blown and tossed by the wind." NIV translation
James goes on to explain that we are not to make a half-hearted plea to God for this wisdom (or anything else).
We must believe that god is our Father and, as the perfect Father, He will provide all that is good for us if we ask.
"That man should not think he will receive anything from the Lord; he is a double-minded man, unstable in all he does." NIV translation
James is talking about the man who asks with doubt in his heart. We must understand that doubt is not from or of God but is a remnant of sin and the devil. All doubt is against God and either His love and willingness to take care of us or His power and ability to do so. Sometimes, we may doubt because we do not think that we deserve what we ask for but once again this is doubting God. In that case, we doubt His ability to forgive and forget our sins through the blood of Jesus Christ. We have been given a gift to help us with this struggle and that gift is the Holy Spirit.
"The brother in humble circumstances ought to take pride in his high position. But the one who is rich should take pride in his low position, because he will pass away like a wild flower. For the sun rises with scorching heat and withers the plant; its blossom falls and its beauty is destroyed. In the same way, the rich man will fade away even while he goes about his business." NIV translation
This passage may seem tough on those who have been blessed with money here on earth but there is a reason for it. James tells us what seems to be opposite of our world today where the rich are exalted as a big success story. Here, he tells us that the one in "humble circumstances" has a higher position and the reason is really simple. When you have less of riches, you look to God more and grow closer to Him. The rich are usually more reliant on themselves and their own efforts and their relationship with God tends to suffer. They, like the wild flower, tend to fade as they rely on God less and less.