Where are the paths (listed under GEM PATHS) stored, so that “gem env” can display them?
I’m asking, because I would like to remove one of the paths. The picture above shows the environment on my private computer. On my business computer, the second path is a network path, where I do not have write permission. Before contacting the IT I would like to change the path to a location where I have permission.
By the way: I’m using the portable version of ruby 2.6.6 on Windows.
They appear to be stored in the environment variables GEM_HOME and GEM_PATH.
Calling:
$ gem help env
Includes the following:
RubyGems’ default local repository can be overridden with the GEM_PATH and GEM_HOME environment variables. GEM_HOME sets the default repository to install into. GEM_PATH allows multiple local repositories to be searched for gems.
This makes sence, because the object ENV has no key GEM_PATH.
I tried to illustrate my question with several screenshots, but unfortunately as a new user I am only allowed to insert one picture in an answer. So i have to move on with only text instead of screenshots.
IT has mapped my HOMEDRIVE (usually c:) to a network directory.
But directly on this HOMEDRIVE I don’t have write access. In HOMEDRIVE they created a directory Documents where I have write access. On H itself I have no write permissions.
gem env leads to:
GEM PATHS:
<path/to/my/ruby/>/lib/ruby/gems/2.6.0
H:/.gem/ruby/2.6.0
But there is no directory H:/.gem/ruby/2.6.0. For this reason I wondered how the directory gets into GEM PATHS. It would be great if I could tell ruby to use instead H:/Documents/.gem/...
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.