# Modify RubyGems install location on Windows

**URL:** <https://www.ruby-forum.com/t/modify-rubygems-install-location-on-windows/259905>\
**Category:** Development\
**Created:** [June 27, 2020, 8:32pm UTC](https://www.ruby-forum.com/t/modify-rubygems-install-location-on-windows/259905 "2020-06-27T20:32:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NU2rb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/9dc877/32.png) [@NU2rb](https://www.ruby-forum.com/u/NU2rb)\
**Post date:** [June 27, 2020, 8:32pm UTC](https://www.ruby-forum.com/t/modify-rubygems-install-location-on-windows/259905/1 "2020-06-27T20:32:54Z")

</div>

I am making a RubyPortable (PAF) for Windows and I want to have Rubygems not install to the user directory (C:/Users/username/.gem/ruby/some\_version\_number) or even have that in the GEM\_PATH so that when using it on other machines and installing gems they are not left on that machine; that is to say the only location I want them installed to is GEM\_HOME.

I have searched all over but am still unclear how to do this. Ideally, I would want to make it so that it is a permanent modification that is always enabled whenever I start RubyPortable but a ‘temporary’ fix that enables it for that session only would work as well.

Can anyone point me in the right direction?

Thank you.
