New Discussion

Notifications

You’re not receiving notifications from this thread.

When installing Rails 6 on Ubuntu 20.04 I get an error with the Nokogiri gem

1
Rails

I have been following the instructions at https://gorails.com/setup/ubuntu/20.04#ruby-rbenv. I get the following error,

Installing nokogiri 1.10.9 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.7.0/gems/nokogiri-1.10.9/ext/nokogiri

/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20200522-63887-8bdogk.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.

The rails version installed is 6.0.3.1, the ruby version is 2.7 and the Ubuntu version is 20.04 LTS. I am confused about the rails version because I used the 'gem install rails -v 6.0.2.2' command.

Any advice about how to proceed would be welcome.

I had problems because I didn't follow the instructions exactly. Everything works now.

Join the discussion
Create an account Log in

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.