make setting of the rubygems source more robust