The wrong Ruby version when working with cocoapod
<p>Our project is written in Objective-C, and use an old version of cocoapod (0.38.0).</p>

<p>All my colleagues use the old version of Ruby (2.0.0).
I have the latest version of Ruby (2.3.1), so I need to install more the old Ruby version (2.0.0) as my colleagues have.</p>

<pre>
rvm install 2.0.0
rvm use 2.0.0
</pre>

<p>I cocoapod install</p>

<pre>
pod _0.38.0_ install
</pre>

<p>and get an error like this:</p>

<pre>
Ignoring executable-hooks-1.3.2 because its extensions are not built.  Try: gem pristine executable-hooks --version 1.3.2
Ignoring gem-wrappers-1.2.7 because its extensions are not built.  Try: gem pristine gem-wrappers --version 1.2.7
/usr/local/Cellar/ruby/2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'cocoapods' (= 0.38.0) among 11 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/chipbk10/.rvm/gems/ruby-2.0.0-p648:/Users/chipbk10/.rvm/gems/ruby-2.0.0-p648@global', execute `gem env` for more information
        from /usr/local/Cellar/ruby/2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:328:in `to_spec'
        from /usr/local/Cellar/ruby/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
        from /usr/local/bin/pod:22:in `
</pre>

<p>I tried as suggested, but it doesn't help</p>

<pre>
gem pristine executable-hooks --version 1.3.2
gem pristine gem-wrappers --version 1.2.7
</pre>

<p>Another strange thing is in the error, there are different versions of Ruby appear: 2.0.0, 2.3.1, 2.3.0</p>

<p>This is all ruby versions I have</p>

<pre>
rvm list rubies

=* ruby-2.0.0-p648 [ x86_64 ]
   ruby-2.3.1 [ x86_64 ]
</pre>

<p>my cocoapod version is</p>

<pre>
pod --version
1.0.1
</pre>