ruby: create lib paths in post-install

Closes #28466.
Closes #28343.