Ruby Compass ERROR: Failed to build gem native extension
mkmf.rb can't find header files for ruby at
You need the ruby dev headers files to compile gems.
You need the package ruby2.1-dev
.
You may also need other packages like build-essential
.
Try the following:
sudo apt-get install ruby2.1-dev build-essential
On earlier versions of Ubuntu such as 14.04, you will need the ruby2.0-dev
package instead.
sudo apt-get install ruby2.0-dev build-essential
Error installing compass. Failed to build gem native extension (Compass)
I had faced the same issues, after going through the following Link, i have installed the Xcode and my issues is resolved.
Try to install Xcode or apple developer tools.
Failed to build gem native extension when installing bcrypt-ruby gem
I had to add a flag when installing:
gem install bcrypt-ruby -v '3.0.1' -- --with-cflags=-Wno-implicit-function-declaration
This installed the gem successfully with Ruby 2.7.2
Related Topics
How to Call Methods Dynamically Based on Their Name
Difference Between "Or" and || in Ruby
Connecting Rails 3.1 With Multiple Databases
Difference Between Rake Db:Migrate Db:Reset and Db:Schema:Load
Pg::Connectionbad - Could Not Connect to Server: Connection Refused
What Is the Easiest Way to Duplicate an Activerecord Record
How to Redirect to a 404 in Rails
Why Does Ruby 1.9.2 Remove "." from Load_Path, and What's the Alternative
Why Doesn't Ruby Support Method Overloading
How to Match the Last Occurrence of a Pattern
How to Convert a Bigdecimal to a 2-Decimal-Place String
Why Is "Slurping" a File Not a Good Practice
How to Convert a Unix Timestamp (Seconds Since Epoch) to Ruby Datetime