title: How to fix a broken System Ruby installation
body: <p>My Mac system Ruby installation is completely broken. </p>
  
  <p>I've seen several posts recommending me to set up RVM or rbenv but I'm trying to install an Xcode pod (cocoapods), and I have no idea why my system Ruby is so broken.</p>
  
  <p>When I run <code>gem</code>, I get the following output:</p>
  
  <pre><code>NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
  Gem::Specification#rubyforge_project= called from /Library/Ruby/Gems/2.3.0/specifications/coffee-script-source-1.11.1.gemspec:16.
  NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
  Gem::Specification#rubyforge_project= called from /Library/Ruby/Gems/2.3.0/specifications/em-websocket-0.5.1.gemspec:15.
  NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
  Gem::Specification#rubyforge_project= called from /Library/Ruby/Gems/2.3.0/specifications/escape-0.0.4.gemspec:18.
  NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
  Gem::Specification#rubyforge_project= called from /Library/Ruby/Gems/2.3.0/specifications/fuzzy_match-2.0.4.gemspec:17.
  NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
  Gem::Specification#rubyforge_project= called from /Library/Ruby/Gems/2.3.0/specifications/i18n-0.9.5.gemspec:17.
  NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
  Gem::Specification#rubyforge_project= called from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/gems/2.3.0/specifications/nokogiri-1.5.6.gemspec:22.
  NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
  Gem::Specification#rubyforge_project= called from /Library/Ruby/Gems/2.3.0/specifications/rouge-2.2.1.gemspec:18.
  NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01.
  Gem::Specification#rubyforge_project= called from /Library/Ruby/Gems/2.3.0/specifications/sass-3.7.4.gemspec:21.
  RubyGems is a sophisticated package manager for Ruby.  This is a
  basic help message containing pointers to more information.
  </code></pre>
  
  <p>and it seems that these are just deprecation warnings, and, from some other posts, that the answer is to simply run <code>gem pristine --all --no-extensions</code>.</p>
  
  <p>When I run essentially any <code>gem</code> command, I get a permissions error:</p>
  
  <pre><code>ERROR:  While executing gem ... (Gem::FilePermissionError)
      You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/gems/2.3.0 directory.
  </code></pre>
  
  <p>How do I reset my system Ruby? I don't use Ruby and I had run the command <code>gem install cocoapods</code> yesterday. Since then it's been unusable.</p>