Ryan Davis
2018-05-25 19:47:49 UTC
I installed ruby-2.4.4 from the default tarball on a RHEL5 system to
/tmp/ruby24. I want to install gems manually to /tmp/ruby24p (I want
all gems in a separate directory).
Use GEM_HOME=/tmp/ruby24p instead:/tmp/ruby24. I want to install gems manually to /tmp/ruby24p (I want
all gems in a separate directory).
% export GEM_HOME=/tmp/ruby24p
% gem install xyz
If you want to install into DIFFERENT directories each, keep setting GEM_HOME to the locations. To use them all, set GEM_PATH to the previous GEM_HOME values, separated by $IFS (:):
% export GEM_HOME=/tmp/ruby24p1
% gem install abc
% export GEM_HOME=/tmp/ruby24p2
% gem install def
% export GEM_PATH=/tmp/ruby24p1:/tmp/ruby24p2
% ruby my_script.rb
Unsubscribe: <mailto:ruby-talk-***@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>