Skip to content

Instantly share code, notes, and snippets.

@hisanari
Created June 9, 2018 04:33
Show Gist options
  • Save hisanari/205c1c4078003c856cc3de002b9613fb to your computer and use it in GitHub Desktop.
Save hisanari/205c1c4078003c856cc3de002b9613fb to your computer and use it in GitHub Desktop.
Ubuntu Rails5 nokogiri 1.8.2 インストール エラー時の解決メモ ref: https://qiita.com/yowayowa/items/828d9fb91317f8db72ae
Installing nokogiri 1.8.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/nokogiri-1.8.2/ext/nokogiri
/usr/bin/ruby2.5 -r ./siteconf20180609-8585-1wf897h.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.5.0/gems/nokogiri-1.8.2 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.8.2/gem_make.out
An error occurred while installing nokogiri (1.8.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.8.2' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
rails was resolved to 5.1.4, which depends on
actioncable was resolved to 5.1.4, which depends on
actionpack was resolved to 5.1.4, which depends on
actionview was resolved to 5.1.4, which depends on
rails-dom-testing was resolved to 2.0.3, which depends on
nokogiri
sudo apt-get install build-essential liblzma-dev patch ruby-dev zlib1g-dev
libgmp-dev libgmpxx4ldbl liblzma-dev ruby-dev ruby2.5-dev ruby2.5-doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment