More changes to fix various Rubies failing to install certain Ruby gems.

This is a follow-up on commit d45a8b2b68d5b0df246ca95853eaad7533f9321d.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>