James 2

James 2:24

"You see that a man is justified by works and not by faith alone."
Was Rahab praised for lying?

James isn't complimenting Rahab for lying here -- he's complimenting her for her loyalty to the God of Israel and His promise to destroy Jericho, which she enacted by giving lodging to the spies and sending them in a different direction.

If one objects that Rahab is a poor example because she used deception, one must also consider whether those who have historically hidden innocent victims from oppressive regimes and lied to protect them are likewise poor examples of humanitarians.

Christianity acknowledges situations where a higher moral duty to preserve life and protect the innocent takes precedence, just as Christ taught regarding healing on the Sabbath. In the context of her world, Rahab's deception to save lives for a greater good was recognized as an act of faith and honorable courage.