Require rubygems when invoking ruby to query version and gem path