Home » Ruby » Error Installing Jekyll – Native Extension Build

Error Installing Jekyll – Native Extension Build

Posted by: admin November 30, 2017 Leave a comment

Questions:

I’m having some trouble installing jekyll. Can’t quite figure out how to patch the missing link. I think it’s an update to Ruby, but RVM is having trouble installing alternate versions of ruby as well.

Heres the full post:

$ sudo gem install jekyll    

ERROR:  Error installing jekyll:
ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/fast-stemmer-1.0.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/fast-stemmer-1.0.1/ext/gem_make.out

Does this mean I need to update the version of ruby I’m using via rvm?

Answers:

Your problem is that either you system doesn’t know where make is located at or you don’t have it installed. The easiest way to fix this (and probably other issues you’ll run into trying to get a ruby system up and running) is to install xcode.

You can get it at http://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12 for lion. Or it came on a CD with your computer for earlier versions.

If you’re using Lion, please see comments below for a link to how to install developer tools on Lion.

Questions:
Answers:

Ubuntu

  1. sudo apt-get install ruby-dev
  2. gem install jekyll
Questions:
Answers:

I had the same error on Ubuntu and this helped me sort it out.

You must have ruby-dev installed

apt-get install ruby-dev

Questions:
Answers:

Need to install “make”.
I am using Ubuntu 12.10.
sudo apt-get install make
Should work on any Debian based distro.

Questions:
Answers:

If you installed XCode and command line tools are still missing go to Terminal and

xcode-select --install

it will prompt you to install these tools. After that just follow SrBlanco´s answer. That solved the problem for me.

Good luck.

Questions:
Answers:

Note: this problem also occurs on newer MacBook Pro models that come with Mavericks pre-installed. I updated another post with my own solution that didn’t involve Xcode at all. My system had the Xcode developer tools installed when I got the machine.

ERROR: Error installing jekyll: ERROR: Failed to build gem native extension

Questions:
Answers:

Install Xcode as mentioned if you don’t have it installed already (https://developer.apple.com/xcode/). Plus you need the command line tools.

Open Xcode. Go to Preferences > Downloads > Install Command Line Tools

Questions:
Answers:
  • sudo apt-get install ruby-dev
  • sudo gem install jekyll

hope this will help, it works with me.

Questions:
Answers:

I had this same exact error when trying to install Jekyll, and the following steps from this link helped me. Just in case anyone else comes across this!

http://davidensinger.com/2013/03/installing-jekyll/

Questions:
Answers:

Installing command line tools for Xcode solved the problem for me on my Mac

xcode-select --install.

Questions:
Answers:

I was facing the same issue in my Fedora 22 setup. I had ruby installed but didn’t have ruby-devel. Installing ruby-devel fixed the issue for me.

dnf install -y ruby-devel

For older systems:

yum install -y ruby-devel

Questions:
Answers:

An addendum: You can install XCode now from the App Store on Mountain Lion. The process is transparent and pretty fast.

Questions:
Answers:

I had the same problems with you.

I use Mac OS X 10.9 develop preview version, and I had installed gcc and Xcode.

But my Xcode version is 4.6.

Then I install the Xcode 5.0

After that I type sudo gem install jekyll in the terminal again. Then it works.

Wish it could help someone.

Questions:
Answers:

Installing Xcode and going to perferencs > downloads > install commandline tools WORKS!

Questions:
Answers:

Same problem on Debian, I had forgot to run this command:

~/.rvm/scripts/rvm

Questions:
Answers:

All these answers did NOT work for me.

If you’re looking for a solution on ubuntu 14.04, do this:

sudo apt-get install ruby1.9.1-dev zlib1g-dev nodejs
sudo gem install jekyll -v 2.5.3

Unfortunately, nodejs is required because of a bug in Jekyll that enforces existence of runtime JS engine even though it doesn’t need one.

Leave a Reply

Your email address will not be published. Required fields are marked *