title: Error when running Jekyll: cannot load such file -- google/api_client (LoadError)
body: <p>I had to reinstall OS X Yosemite 10.10.5 and now I get the following error when running my Jekyll site (previously it was working fine):</p>
  
  <pre><code>MacBook-Pro-Svetlana:iloveip svetlana$ jekyll serve
  WARN: Unresolved specs during Gem::Specification.reset:
        pygments.rb (~&gt; 0.6.0)
        redcarpet (~&gt; 3.1)
        jekyll-watch (~&gt; 1.1)
  WARN: Clearing out unresolved specs.
  Please report a bug if this causes problems.
  Configuration file: /Users/svetlana/Desktop/iloveip/_config.yml
  /Users/svetlana/Desktop/iloveip/_plugins/page_view.rb:4:in `require': cannot load such file -- google/api_client (LoadError)
      from /Users/svetlana/Desktop/iloveip/_plugins/page_view.rb:4:in `&lt;top (required)&gt;'
      from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:74:in `require'
      from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:74:in `block (2 levels) in require_plugin_files'
      from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:73:in `each'
      from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:73:in `block in require_plugin_files'
      from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:72:in `each'
      from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:72:in `require_plugin_files'
      from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:18:in `conscientious_require'
      from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:79:in `setup'
      from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:41:in `initialize'
      from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:29:in `new'
      from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:29:in `process'
      from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program'
      from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
      from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
      from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
      from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
      from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
      from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
      from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/bin/jekyll:20:in `&lt;top (required)&gt;'
      from /usr/local/bin/jekyll:23:in `load'
      from /usr/local/bin/jekyll:23:in `&lt;main&gt;'
  </code></pre>
  
  <p>I have 'google-api-client' gem installed for one of my plugins. And Ruby was installed using Homebrew <code>brew install ruby</code>. When I check Ruby version I get:</p>
  
  <pre><code>MacBook-Pro-Svetlana:iloveip svetlana$ ruby -v
  ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
  </code></pre>
  
  <p>But when I run <code>$ gem list google-api-client -d</code> I get:</p>
  
  <pre><code>MacBook-Pro-Svetlana:iloveip svetlana$ gem list google-api-client -d
  
  *** LOCAL GEMS ***
  
  google-api-client (0.8.6)
      Authors: Bob Aman, Steven Bazyl
      Homepage: https://github.com/google/google-api-ruby-client/
      License: Apache-2.0
      Installed at: /usr/local/lib/ruby/gems/2.2.0
  
      The Google API Ruby Client makes it trivial to discover and access
      Google's REST APIs.
  </code></pre>
  
  <p>I guess it has to do something with different Ruby versions installed on my computer. As the gem was installed with <code>$ sudo gem install google-api-client</code>. How can I fix that?</p>
  
  <p><em>(Previously Ruby was installed using RVM, but I got some errors installing Jekyll, so I uninstalled RVM.)</em></p>
  
  <p>Here's information about my <code>gem environment</code>:</p>
  
  <pre><code>MacBook-Pro-Svetlana:~ svetlana$ gem environment
  RubyGems Environment:
    - RUBYGEMS VERSION: 2.4.5.1
    - RUBY VERSION: 2.2.3 (2015-08-18 patchlevel 173) [x86_64-darwin14]
    - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.2.0
    - RUBY EXECUTABLE: /usr/local/opt/ruby/bin/ruby
    - EXECUTABLE DIRECTORY: /usr/local/bin
    - SPEC CACHE DIRECTORY: /Users/svetlana/.gem/specs
    - SYSTEM CONFIGURATION DIRECTORY: /usr/local/Cellar/ruby/2.2.3/etc
    - RUBYGEMS PLATFORMS:
      - ruby
      - x86_64-darwin-14
    - GEM PATHS:
       - /usr/local/lib/ruby/gems/2.2.0
       - /Users/svetlana/.gem/ruby/2.2.0
       - /usr/local/Cellar/ruby/2.2.3/lib/ruby/gems/2.2.0
    - GEM CONFIGURATION:
       - :update_sources =&gt; true
       - :verbose =&gt; true
       - :backtrace =&gt; false
       - :bulk_threshold =&gt; 1000
       - :sources =&gt; ["https://rubygems.org/"]
    - REMOTE SOURCES:
       - https://rubygems.org/
    - SHELL PATH:
       - /usr/local/bin
       - /usr/bin
       - /bin
       - /usr/sbin
       - /sbin
       - /Users/svetlana/.rvm/bin
  </code></pre>