make sure proper ruby path is passed to rubygems_setup, fix #2586