Fix wrong condition for requiring gems