Refactor to reduce number of loops

Only build the missing_keys array once we have detected that there
actually are missing keys by moving the check to be part of the block
that performs the path substitution.
(cherry picked from commit 1a58ac60d92110cc9a83c976ac1fbd7bfd071966)
Fixed typo in guides [ci skip]
Merge pull request #11473 from arunagw/guides_typo

Fixed typo in guides [ci skip]
Merge pull request #11469 from bvogel/master

Update bcrypt-ruby stable version to 3.1
Fixed README link in API [ci skip]

This should not be a link because
it's creating a link with activesupport README right now