Stand against the devil, and the devil will run from you. James 4:7b, NCV
How to stand against the devil is spelled out in the words before and after this good advice:
So give yourselves completely to God. (4:7a)
Come near to God, and God will come near to you.(4:8a)
Moving further back or forward in the text gives even more clarification. The simple answer to bedevilment is more of God. It's true that the text says that you can shout "no" to the devil and he will have to go, but where are your feet planted and where are you pointed towards as you resist?