error on nokogiri install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri
/usr/bin/ruby2.5 -r ./siteconf20200612-13184-15dwlpy.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.10.9 for inspection. Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/nokogiri-1.10.9/gem_make.out
An error occurred while installing nokogiri (1.10.9), and Bundler cannot continue.
Make sure that gem install nokogiri -v '1.10.9' --source 'https://rubygems.org/' succeeds before bundling.
In Gemfile: rails was resolved to 5.1.7, which depends on actioncable was resolved to 5.1.7, which depends on actionpack was resolved to 5.1.7, which depends on actionview was resolved to 5.1.7, which depends on rails-dom-testing was resolved to 2.0.3, which depends on nokogiri
getting an error, when trying to install just the base nokogiri gem (no version) it also fails
Hi, I'm sorry that the gem won't install. What error message do your receive when trying what was suggested above? For gem install nokogiri -v '1.10.9' --source 'https://rubygems.org/' - assuming that wasn't the command that you had just entered.
I've assigned this thread to our backend devs to look into.
Hi @benwalio!
Can you please answer the following?
- OS version?
- Are you using RVM?
- Ruby version? (run
ruby --version) - Bundler version? (run
bundler --version)
Thanks
if your os is ubuntu i ran this:
sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev
gem install nokogiri
then was able to proceed with bundle install.
I had the same problem, install ruby-dev as @iGlitch suggested helped.