###前提・実現したいこと
初めて質問させていただきます。初歩的な質問で申し訳ありませんが、bundleで詰まってます。
OSのアップデートによる、nokogiriのバージョン関係でのエラーでgemがインストールできないのではと思うのですが、
よろしければ、解決策を教えていただけますでしょうか。
###発生している問題・エラーメッセージ
$ bundle Your Gemfile lists the gem pry-rails (>= 0) more than once. You should probably keep only one of them. While it's not a problem now, it could cause errors if you change the version of one of them later. Fetching gem metadata from https://rubygems.org/........ Using rake 12.2.1 Using CFPropertyList 2.3.5 Using concurrent-ruby 1.0.5 Using i18n 0.9.0 Using minitest 5.10.3 Using thread_safe 0.3.6 Using tzinfo 1.2.4 Using activesupport 5.0.6 Using builder 3.2.3 Using erubis 2.7.0 Using mini_portile2 2.3.0 Fetching nokogiri 1.8.1 Installing nokogiri 1.8.1 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/mbp/rails/SpaceMarket/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.8.1/ext/nokogiri /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20180115-41565-7al102.rb extconf.rb --use-system-libraries checking if the C compiler accepts ... yes checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no Building nokogiri using system libraries. pkg-config could not be used to find libxml-2.0 Please install either `pkg-config` or the pkg-config gem per gem install pkg-config -v "~> 1.1" pkg-config could not be used to find libxslt Please install either `pkg-config` or the pkg-config gem per gem install pkg-config -v "~> 1.1" pkg-config could not be used to find libexslt Please install either `pkg-config` or the pkg-config gem per gem install pkg-config -v "~> 1.1" ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed. *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/$(RUBY_BASE_NAME) --help --clean --use-system-libraries --with-zlib-dir --without-zlib-dir --with-zlib-include --without-zlib-include=${zlib-dir}/include --with-zlib-lib --without-zlib-lib=${zlib-dir}/lib --with-xml2-dir --without-xml2-dir --with-xml2-include --without-xml2-include=${xml2-dir}/include --with-xml2-lib --without-xml2-lib=${xml2-dir}/lib --with-libxml-2.0-config --without-libxml-2.0-config --with-pkg-config --without-pkg-config --with-xslt-dir --without-xslt-dir --with-xslt-include --without-xslt-include=${xslt-dir}/include --with-xslt-lib --without-xslt-lib=${xslt-dir}/lib --with-libxslt-config --without-libxslt-config --with-exslt-dir --without-exslt-dir --with-exslt-include --without-exslt-include=${exslt-dir}/include --with-exslt-lib --without-exslt-lib=${exslt-dir}/lib --with-libexslt-config --without-libexslt-config To see why this extension failed to compile, please check the mkmf.log which can be found here: /Users/mbp/rails/SpaceMarket/vendor/bundle/ruby/2.3.0/extensions/universal-darwin-17/2.3.0/nokogiri-1.8.1/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Users/mbp/rails/SpaceMarket/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.8.1 for inspection. Results logged to /Users/mbp/rails/SpaceMarket/vendor/bundle/ruby/2.3.0/extensions/universal-darwin-17/2.3.0/nokogiri-1.8.1/gem_make.out An error occurred while installing nokogiri (1.8.1), and Bundler cannot continue. Make sure that `gem install nokogiri -v '1.8.1'` succeeds before bundling. In Gemfile: rails was resolved to 5.0.6, which depends on actioncable was resolved to 5.0.6, which depends on actionpack was resolved to 5.0.6, which depends on actionview was resolved to 5.0.6, which depends on rails-dom-testing was resolved to 2.0.3, which depends on nokogiri
###該当のソースコード
bundle
###試したこと
bundle
bundle config build.nokogiri --use-system-libraries
など
###補足情報(言語/FW/ツール等のバージョンなど)
ruby
rails
AWSにデプロイ
OS Mac High Sierra バージョン 10.13.2
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。