Mojaveにnokogiriインストール時にエラー

MacOSをMojaveにアップデート後Nokogiriを bundle install できなくなったので

xcode-select --install
bundle install --path vendor/bundle

エラー内容

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/xxx/Documents/app/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.8.5/ext/nokogiri
/Users/xxx/.anyenv/envs/rbenv/versions/2.5.1/bin/ruby -r ./siteconf20181109-37313-mbj7kg.rb extconf.rb
checking if the C compiler accepts ... *** 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/xxx/.anyenv/envs/rbenv/versions/2.5.1/bin/$(RUBY_BASE_NAME)
	--help
	--clean
/Users/xxx/.anyenv/envs/rbenv/versions/2.5.1/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/xxx/.anyenv/envs/rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:574:in `block in try_compile'
	from /Users/xxx/.anyenv/envs/rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:521:in `with_werror'
	from /Users/xxx/.anyenv/envs/rbenv/versions/2.5.1/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/xxx/.anyenv/envs/rbenv/versions/2.5.1/lib/ruby/2.5.0/mkmf.rb:632:in `with_cflags'
	from extconf.rb:161:in `add_cflags'
	from extconf.rb:410:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/xxx/Documents/app/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-16/2.5.0-static/nokogiri-1.8.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/xxx/Documents/app/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.8.5 for inspection.
Results logged to /Users/xxx/Documents/app/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-16/2.5.0-static/nokogiri-1.8.5/gem_make.out

An error occurred while installing nokogiri (1.8.5), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.8.5' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  rails was resolved to 5.2.1, which depends on
    actioncable was resolved to 5.2.1, which depends on
      actionpack was resolved to 5.2.1, which depends on
        actionview was resolved to 5.2.1, which depends on
          rails-dom-testing was resolved to 2.0.3, which depends on
            nokogiri