0

OS X Yosemite 10.10.5 を再インストールする必要がありましたが、Jekyll サイトを実行すると次のエラーが表示されます (以前は正常に動作していました)。

MacBook-Pro-Svetlana:iloveip svetlana$ jekyll serve
WARN: Unresolved specs during Gem::Specification.reset:
      pygments.rb (~> 0.6.0)
      redcarpet (~> 3.1)
      jekyll-watch (~> 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 `<top (required)>'
    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 `<top (required)>'
    from /usr/local/bin/jekyll:23:in `load'
    from /usr/local/bin/jekyll:23:in `<main>'

プラグインの 1 つに「google-api-client」gem をインストールしました。そして Ruby は Homebrew を使ってインストールしbrew install rubyました。Ruby のバージョンを確認すると、次のようになります。

MacBook-Pro-Svetlana:iloveip svetlana$ ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]

しかし、実行すると次のよう$ gem list google-api-client -dになります。

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.

コンピューターにインストールされているさまざまな Ruby バージョンで何かを行う必要があると思います。gem は$ sudo gem install google-api-client. どうすれば修正できますか?

(以前はRVMを使ってRubyをインストールしていましたが、Jekyllのインストールでエラーが発生したため、RVMをアンインストールしました。)

ここに私の情報がありますgem environment

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 => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["https://rubygems.org/"]
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /Users/svetlana/.rvm/bin
4

1 に答える 1