前提・実現したいこと
#bundle installを実行するとnokogiriでエラーが出てしまいます。
初心者です。
railsでGemfileを入れようとした矢先つまづいてしまい、ググってみたのですが、何が問題点なのか分からずじまいでして・・・
質問させて頂きました。
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is inst
alling for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x
86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run bundle lock -- add-platform x86-mingw32 x86-mswin32 x64-mingw32 java
.
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Using rake 13.0.1
Using concurrent-ruby 1.1.6
Using i18n 1.8.2
Using minitest 5.14.0
Using thread_safe 0.3.6
Using tzinfo 1.2.6
Using activesupport 5.2.4.1
Using builder 3.2.4
Using erubi 1.9.0
Using mini_portile2 2.4.0
Fetching nokogiri 1.10.9
Installing nokogiri 1.10.9 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/Users/name/chat_app/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri
/Users/name/.rbenv/versions/2.5.0/bin/ruby -r
./siteconf20200319-17600-18sohmk.rb extconf.rb --use-system-libraries
checking if the C compiler accepts -I
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml2... ***
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=/Users/name/.rbenv/versions/2.5.0/bin/$(RUBY_BASE_NAME)
--help
--clean
/Users/name/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/name/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:574:in
block in
try_compile'
from /Users/name/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:521:in
with_werror' from /Users/name/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:574:in
try_compile'
from extconf.rb:138:in nokogiri_try_compile' from extconf.rb:162:in
block in add_cflags'
from /Users/name/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:632:in
with_cflags' from extconf.rb:161:in
add_cflags'
from extconf.rb:416:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be
found here:
/Users/name/chat_app/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0-
static/nokogiri-1.10.9/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/Users/name/chat_app/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9 for
inspection.
Results logged to
/Users/name/chat_app/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0-
static/nokogiri-1.10.9/gem_make.out
An error occurred while installing nokogiri (1.10.9), and Bundler cannot continue.
Make sure that gem install nokogiri -v '1.10.9' --source 'https://rubygems.org/'
succeeds before bundling.
In Gemfile:
rails was resolved to 5.2.4.1, which depends on
actioncable was resolved to 5.2.4.1, which depends on
actionpack was resolved to 5.2.4.1, which depends on
actionview was resolved to 5.2.4.1, which depends on
rails-dom-testing was resolved to 2.0.3, which depends on
nokogiri
もし、ご存知の方いらっしゃしましたらご指摘・参考になるサイトをご紹介いただければ幸いです。
何卒よろしくお願いいたします。
あなたの回答
tips
プレビュー