lundi 12 février 2018

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

When i download the rails application from github https://github.com/ari/jobsworth An then give bundle install it throws error

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
An error occurred while installing mysql2 (0.4.4), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.4.4'` succeeds before bundling.

after I give the sudo gem install mysql2 -v '0.4.4' and it displays like

Fetching: mysql2-0.4.4.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
    ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.4.0/gems/mysql2-0.4.4/ext/mysql2
/usr/bin/ruby2.4 -r ./siteconf20180212-10708-v1q8lj.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.4.0/gems/mysql2-0.4.4 for inspection.
Results logged to /var/lib/gems/2.4.0/extensions/x86_64-linux/2.4.0/mysql2-0.4.4/gem_make.out

after run bundle install it throws same error

Aucun commentaire:

Enregistrer un commentaire