From 0d43469b2727d34ff7af9c380971a754f5b42456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolae=20Vl=C4=83descu?= Date: Wed, 25 Mar 2020 22:41:26 +0200 Subject: [PATCH] Fix sudo-less GEM_HOME detection When installing sudo-less the GEM_HOME var was no longer accurate, at least not for me on macOS Catalina. To avoid such errors automate the GEM_HOME discovery. --- source/using/getting-started.html.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/using/getting-started.html.md b/source/using/getting-started.html.md index 37e733af..70ee49ae 100644 --- a/source/using/getting-started.html.md +++ b/source/using/getting-started.html.md @@ -51,8 +51,8 @@ tell RubyGems to install into your user directory by passing either the The latter is in our opinion the best solution. To do this open up terminal and create or edit your `.bash_profile` with your preferred editor. Then enter these lines into the file: ```shell -export GEM_HOME=$HOME/.gem -export PATH=$GEM_HOME/bin:$PATH +export GEM_HOME="$(ruby -r rubygems -e 'puts Gem.user_dir')" +export PATH=${GEM_HOME}/bin:$PATH ``` Note that if you choose to use the `--user-install` option, you will still have