/home/username/.gem/
. Thus, you need to enter in the console:export GEM_HOME = ~ / .gem
~/ruby/gem
for this purpose. The latest version of RubyGems can be downloaded from the official site . Now the latest stable version is 1.0.1mkdir ~ / temp mkdir ~ / ruby / gem cd ~ / temp wget http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz tar -zxf rubygems-1.0.1.tgz cd rubygems-1.0.1 ruby setup.rb all --prefix = ~ / ruby / gem
gem
. If everything is successful - help is displayed on this command. It is possible, however, that an error about the missing file appears. In this case, you need to export another environment variable - RUBYLIB
following command:export RUBYLIB = ~ / ruby / gem / lib
gem
:export PATH = ~ / ruby / gem / bin: $ PATH
~/.gem
. Let's tell the system that gems now need to be dragged from there:export GEM_PATH = ~ / .gem
GEM_
. And both of them point to the same directory, let's see why:GEM_HOME
points to the directory GEM_HOME
new gems will be installed . If you wish, you can add the --install-dir
parameter when installing, but I personally feel lazy, so I chose to set the environment variable once.GEM_PATH
in turn, indicates the directory in which the search for installed gems will occur.Source: https://habr.com/ru/post/19957/
All Articles