James 1:6 But let him ask in faith, nothing wavering. For he that wavereth is like a wave of the sea driven with the wind and tossed. 7 For let not that man think that he shall receive any thing of the Lord.
James has just given an incredibly encouraging statement by saying God “gives to all men liberally and upbraids (gets angry) not” but then follows up with a verse that seems to completely contradict it. It’s easy to read James 1:5–7 and think he is describing two different God’s. One who gives generously in love (James 1:5) and another who refuses to give blessings (James 1:6–7).
The key to understanding this contradiction is noticing the emphasis that James places on coming to God in Faith.
A visual picture is given to us in 1:6 of a wave in the ocean that is pushed along (driven) and thrown around (tossed) by the wind. The idea is of something that’s constantly fluctuating or moving back and forth with no peace or consistency at all.
This picture can easily be applied to a person who doesn’t ask God for wisdom in Faith. The circumstances or experiences of life like wind will toss that individual from being a confident Christian, to questioning the goodness of God in a matter of minutes.
This fits in with James 1:5 because we are told anyone who wants faith should ask God for it. The word for ask in that verse is actually the Greek word alteo which means; “to ask (in genitive case): —ask, beg, call for, crave, desire, require.” 
In other words God will give His wisdom generously only to those who cry out loudly and beg for it. Now this may seem unfair at first, but the truth is only those who truly trust God (and seek Him fully) deserve to receive that wisdom.
I guess the bigger question is should a loving God demand that we have complete faith in Him?
I mean honestly if He was actually loving and generous wouldn’t He give help no matter how weak we are?
Actually this act of God that seems so unloving  is one of the most loving things He can possibly do to us.
Every parent at some point in their lives has to place rules or restrictions on their children that seems unfair. Of course this results in an argument that usually ends with the parent saying “because I said so that’s why!”
The truth is those restrictions are about much more than the parent wanting something to happen.
Parents have a better knowledge or understanding of life than their children because of lessons that have been learned from experience. And with that knowledge they are able to see dangers their child is heading towards when the child doesn’t. So for the SAFETY OF THE CHILD they place restrictions on them.
In the same way God knows that someone who doesn’t have any stability like the wave in James 1:6 will never really be able to honor Him. Also the kind of testimony that they share will give other people the wrong idea about Christians . But the greatest danger with this lifestyle is it finds strength in ourselves (emotions/feelings) instead of God.
So in love He refuses to bless those who don’t exhibit true commitment…and lovingly calls them to give Him first place.
: from Strongs Greek Concordance
: demanding complete trust in Him
: When things are good they live for God, when things are bad they don’t