Remove unneeded check in install_gems
(cherry picked from commit 20302140018c5b7398e61393401aa75643472ab9)