syncing-server icon indicating copy to clipboard operation
syncing-server copied to clipboard

error on nokogiri install

Open benwalio opened this issue 5 years ago • 4 comments

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

benwalio avatar Jun 12 '20 00:06 benwalio

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.

JaspalSuri avatar Jun 12 '20 01:06 JaspalSuri

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

johnny243 avatar Jun 12 '20 02:06 johnny243

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.

iGlitch avatar Jul 05 '20 03:07 iGlitch

I had the same problem, install ruby-dev as @iGlitch suggested helped.

lucky13820 avatar Jul 22 '20 18:07 lucky13820