Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save johngerome/133b127c9f8545dccc54 to your computer and use it in GitHub Desktop.
Save johngerome/133b127c9f8545dccc54 to your computer and use it in GitHub Desktop.
```
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.1.0/gems/ffi-1.9.10/ext/ffi_c
/usr/bin/ruby2.1 -r ./siteconf20151118-18985-1l1bsx7.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.1.0/gems/ffi-1.9.10 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/ffi-1.9.10/gem_make.out
```
To Fix
`sudo apt-get install ruby2.1-dev` for 2.1.
@CoolLawyer
Copy link

Thanks a lot! Work for me too!

@willydee
Copy link

willydee commented Nov 8, 2017

👍

@spandey6
Copy link

spandey6 commented Jan 4, 2018

This didn't fix my issue I keep getting the issue and I have uploaded the screenshot of the issue.
Any suggestion for this issue.

Thanks
screen shot 2018-01-04 at 2 17 23 pm

@jeeo
Copy link

jeeo commented Jan 25, 2018

works to me too 👍

@miklud
Copy link

miklud commented Jan 27, 2018

to me too +1

@NoSkillGuy
Copy link

worked 👍

@shanalikhan
Copy link

Worked !

@Ram-Aditya
Copy link

Thank you so much :) ! Saved me a lot of trouble!

@tom-james-watson
Copy link

sudo apt install ruby-dev will work regardless of what version is available in your repositories.

@Arnaud-Dorthe
Copy link

Arnaud-Dorthe commented Mar 2, 2020

Even better:
sudo apt-get install ruby ruby-all-dev

@KyuhwanYeon
Copy link

sudo apt install ruby2.3-dev

Thanks it works for me

@Marshmallows7920
Copy link

Even better: sudo apt-get install ruby ruby-all-dev

after hours of searching THIS WORKED TYSM can't believe this thread is like almost 10 years old. looks like it wont be fixed, hello future people in pain - april 2023

@puzzle29
Copy link

Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment