fix environment issues when installing gems with rbenv_gem

This in particular would cause issues when installing jruby gems