Skip to main content
  1. About
  2. Stack Internal
The 2026 Annual Developer Survey is live— take the Survey today!
Fix prettyprint
Source Link
Michael come lately
  • 9.7k reputation score 9661
  • 8
  • 8 gold badges
  • 72
  • 72 silver badges
  • 98
  • 98 bronze badges

This will fix the issue on MacOs MojaveMacOS Mojave and MacOs CatalinaCatalina in a clean way:

brew install ruby
brew install ruby

Then set GEM_HOMEGEM_HOME to your user directory. On the terminal:

Bash:

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

OR if on Zsh:

echo '# Install Ruby Gems to ~/gems' >> ~/.zshrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.zshrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.zshrc
source ~/.zshrc
  • Bash:

    echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
    echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
    echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
    source ~/.bashrc
    
  • OR if on Zsh:

    echo '# Install Ruby Gems to ~/gems' >> ~/.zshrc
    echo 'export GEM_HOME=$HOME/gems' >> ~/.zshrc
    echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.zshrc
    source ~/.zshrc
    

This will fix the issue on MacOs Mojave and MacOs Catalina in a clean way:

brew install ruby

Then set GEM_HOME to your user directory. On the terminal:

Bash:

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

OR if on Zsh:

echo '# Install Ruby Gems to ~/gems' >> ~/.zshrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.zshrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

This will fix the issue on MacOS Mojave and Catalina in a clean way:

brew install ruby

Then set GEM_HOME to your user directory. On the terminal:

  • Bash:

    echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
    echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
    echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
    source ~/.bashrc
    
  • OR if on Zsh:

    echo '# Install Ruby Gems to ~/gems' >> ~/.zshrc
    echo 'export GEM_HOME=$HOME/gems' >> ~/.zshrc
    echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.zshrc
    source ~/.zshrc
    
added 23 characters in body
Source Link
Fmessina
  • 3.8k reputation score 3771
  • 3
  • 3 gold badges
  • 34
  • 34 silver badges
  • 34
  • 34 bronze badges

This will fix the issue on MacOs Mojave and MacOs Catalina in a clean way:

brew install ruby

Then set GEM_HOME to your user directory. On the terminal:

Bash:

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

OR if on Zsh:

echo '# Install Ruby Gems to ~/gems' >> ~/.zshrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.zshrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

This will fix the issue on MacOs Mojave in a clean way:

brew install ruby

Then set GEM_HOME to your user directory. On the terminal:

Bash:

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

OR if on Zsh:

echo '# Install Ruby Gems to ~/gems' >> ~/.zshrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.zshrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

This will fix the issue on MacOs Mojave and MacOs Catalina in a clean way:

brew install ruby

Then set GEM_HOME to your user directory. On the terminal:

Bash:

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

OR if on Zsh:

echo '# Install Ruby Gems to ~/gems' >> ~/.zshrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.zshrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.zshrc
source ~/.zshrc
added 4 characters in body
Source Link
Fmessina
  • 3.8k reputation score 3771
  • 3
  • 3 gold badges
  • 34
  • 34 silver badges
  • 34
  • 34 bronze badges

This will fix the issue on MacOs MojaveMacOs Mojave in a clean way:

brew install ruby

Then set GEM_HOME to your user directory. On the terminal:

Bash:

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

OR if on Zsh:

echo '# Install Ruby Gems to ~/gems' >> ~/.zshrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.zshrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

This will fix the issue on MacOs Mojave in a clean way:

brew install ruby

Then set GEM_HOME to your user directory. On the terminal:

Bash:

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

OR if on Zsh:

echo '# Install Ruby Gems to ~/gems' >> ~/.zshrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.zshrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

This will fix the issue on MacOs Mojave in a clean way:

brew install ruby

Then set GEM_HOME to your user directory. On the terminal:

Bash:

echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

OR if on Zsh:

echo '# Install Ruby Gems to ~/gems' >> ~/.zshrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.zshrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.zshrc
source ~/.zshrc
Source Link
Fmessina
  • 3.8k reputation score 3771
  • 3
  • 3 gold badges
  • 34
  • 34 silver badges
  • 34
  • 34 bronze badges
Loading
lang-rb
Morty Proxy This is a proxified and sanitized view of the page, visit original site.