I get the below error when I execute bundle update
:
To see why this extension failed to compile, please check the mkmf.log which can
be found here:/Users/jack/.rvm/gems/ruby-2.3.3/extensions/x86_64-darwin-16/2.3.0/pg-0.18.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/Users/jack/.rvm/gems/ruby-2.3.3/gems/pg-0.18.4 for inspection. Results logged to
/Users/jack/.rvm/gems/ruby-2.3.3/extensions/x86_64-darwin-16/2.3.0/pg-0.18.4/gem_make.outAn error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure thatgem install pg -v '0.18.4'
succeeds before bundling.
I don't know why I get this issue. And I execute the gem install pg -v '0.18.4'
:
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/jack/.rvm/gems/ruby-2.3.3/extensions/x86_64-darwin-16/2.3.0/pg-0.18.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/jack/.rvm/gems/ruby-2.3.3/gems/pg-0.18.4 for inspection. Results logged to /Users/jack/.rvm/gems/ruby-2.3.3/extensions/x86_64-darwin-16/2.3.0/pg-0.18.4/gem_make.out
My Gemfile is this:
source 'https://gems.ruby-china.org'
gem 'rails', '5.0.0.1'
gem 'puma', '3.4.0'
gem 'sass-rails', '5.0.6'
gem 'uglifier', '3.0.0'
gem 'coffee-rails', '4.2.1'
gem 'jquery-rails', '4.1.1'
gem 'turbolinks', '5.0.1'
gem 'jbuilder', '2.4.1'
group :development, :test do
gem 'sqlite3', '1.3.11'
gem 'byebug', '9.0.0', platform: :mri
end
group :development do
gem 'web-console', '3.1.1'
gem 'listen', '3.0.8'
gem 'spring', '1.7.2'
gem 'spring-watcher-listen', '2.0.0'
end
group :production do gem 'pg', '0.18.4'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Edit -1
My OS is macOS Sierra