gottfrois / link_thumbnailer

Ruby gem that fetches images and metadata from a given URL. Much like popular social website with link preview.
MIT License
512 stars 106 forks source link

Gem::Ext::BuildError: ERROR: Failed to build gem native extension #137

Closed nardonykolyszyn closed 5 years ago

nardonykolyszyn commented 5 years ago

Ruby version: 2.4.1 Rails: 5.1.7

current directory: /home/devpolish/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/json-2.2.0/ext/json/ext/generator
/home/devpolish/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20190618-4918-1plmchb.rb extconf.rb
creating Makefile

current directory: /home/devpolish/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/json-2.2.0/ext/json/ext/generator
make "DESTDIR=" clean

current directory: /home/devpolish/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/json-2.2.0/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
gcc: error: unrecognized command line option '-Wimplicit-fallthrough=0'
Makefile:241: recipe for target 'generator.o' failed
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/devpolish/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/json-2.2.0 for inspection.
Results logged to /home/devpolish/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0-static/json-2.2.0/gem_make.out

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

In Gemfile:
  link_thumbnailer was resolved to 3.3.2, which depends on
    json
nardonykolyszyn commented 5 years ago

Upgrading Ruby up to 2.5.2 version worked for me