Paul, the apostle to us gentiles in this age of grace, plainly tells us, "For by grace are ye saved through faith; and that not of yourselves: it is the gift of God: Not of works, lest any man should boast." Eph. 2:8,9
The passage in James was not written to us in this present dispensation. If you doubt this, read the opening verse: James 1:1. "To the twelve tribes which are scattered abroad, greeting."