Web Development

The dreaded Gem::Ext::BuildError: ERROR: Failed to build gem native extension has been in existence since I started dabbling with higher versions of rails.

Fetching gem metadata from https://rubygems.org/...........
Fetching rake 11.2.2
Installing rake 11.2.2
Using i18n 0.7.0
Fetching json 1.8.3
Installing json 1.8.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/user/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
/Users/user/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20170619-29262-1b1jy13.rb extconf.rb
creating Makefile

Remove the Gemfile.lock file

Removing the Gemfile.lock file lets your bundler do its work and find the compatible versions for your gems. Run bundler and you’ll have a nice install and have a new Gemfile.lock file.

Bundle complete! 51 Gemfile dependencies, 177 gems now installed.

Voila!