Installing Cocoapods on OS X El Capitan error
<p>First of all. I updated to El Capitan because of iOS 9.3 and it's support only in xCode 7.3.</p>

<p>After update I discovered that <code>pod</code> command isn't working.
I executed:</p>

<pre><code>sudo gem install cocoapods
ERROR:  Error installing cocoapods:
    activesupport requires Ruby version &gt;= 2.2.2.
</code></pre>

<p>So my problem is that I can't install cocoapods. I don't know nothing about gems and ruby stuff. Does somebody know how to handle this?</p>

<p>I had second OS X with El Capitan 10.11.4 and everything went ok so I don't know from where this issue is coming from.</p>

<p><strong>UPDATE: 5 April 2016</strong></p>

<p>I executed several commands on terminal for more info:</p>

<pre><code>Kapucha:~ kapucha$ which ruby
/usr/bin/ruby
Kapucha:~ kapucha$ which gem
/usr/bin/gem
Kapucha:~ kapucha$ which brew
/usr/local/bin/brew
Kapucha:~ kapucha$ which rvm
/Users/kapucha/.rvm/bin/rvm
</code></pre>

<p>Versions:</p>

<pre><code>Kapucha:~ kapucha$ ruby --version
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
Kapucha:~ kapucha$ gem --version
2.2.2
Kapucha:~ kapucha$ brew --version
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir': Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15 (Errno::EACCES)
Kapucha:~ kapucha$ rvm --version
rvm 1.27.0 (latest) by Wayne E. Seguin &lt;wayneeseguin@gmail.com&gt;, Michal Papis &lt;mpapis@gmail.com&gt; [https://rvm.io/]
</code></pre>

<p>.bash_profile file and .profile</p>

<pre><code>Kapucha:~ kapucha$ cat .bash_profile
export JAVA_HOME=$(/usr/libexec/java_home)
. ~/.bashrc
source ~/.profile

Kapucha:~ kapucha$ cat .profile
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
</code></pre>

<p>rvm list and rvm info</p>

<pre><code>Kapucha:local kapucha$ rvm list

rvm rubies


# No rvm rubies installed yet. Try 'rvm help install'.

Kapucha:local kapucha$ rvm info

system:

  system:
    uname:       "Darwin Kapucha.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64"
    system:      "osx/10.11/x86_64"
    bash:        "/bin/bash =&gt; GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)"
    zsh:         "/bin/zsh =&gt; zsh 5.0.8 (x86_64-apple-darwin15.0)"

  rvm:
    version:      "rvm 1.27.0 (latest) by Wayne E. Seguin &lt;wayneeseguin@gmail.com&gt;, Michal Papis &lt;mpapis@gmail.com&gt; [https://rvm.io/]"
    updated:      "18 hours 23 minutes 25 seconds ago"
    path:         "/Users/kapucha/.rvm"

  homes:
    gem:          "not set"
    ruby:         "not set"

  binaries:
    ruby:         "/usr/bin/ruby"
    irb:          "/usr/bin/irb"
    gem:          "/usr/bin/gem"
    rake:         "/usr/bin/rake"

  environment:
    PATH:         "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/filipkotwicki/dev/tools/android-sdk-macosx/platform-tools:~/bin:/opt/X11/bin:/usr/local/git/bin:/Users/kapucha/.rvm/bin:/Users/kapucha/.rvm/bin"
    GEM_HOME:     ""
    GEM_PATH:     ""
    MY_RUBY_HOME: ""
    IRBRC:        ""
    RUBYOPT:      ""
    gemset:       ""
</code></pre>

<p>When I'm triying to install Ruby with rvm</p>

<pre><code>Kapucha:local kapucha$ rvm install 2.2.2
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/osx/10.11/x86_64/ruby-2.2.2.tar.bz2
Checking requirements for osx.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir': Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15 (Errno::EACCES)
...
ERROR: '/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
Requirements installation failed with status: 1.
</code></pre>

<p>Tried brew doctor with the same result:</p>

<pre><code>Kapucha:local kapucha$ brew doctor
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir': Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15 (Errno::EACCES)
</code></pre>