Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

My system has:

  • ruby 2.0.0p451 (2014-02-24) [x64-mingw32]
  • gem -version 2.2.2
  • devKit : DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe

When I try to run gem install jekyll, I get this error:

D:\devKit>gem install jekyll
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
        ERROR: Failed to build gem native extension.

    "D:/Program Files (x86)/Ruby200-x64/bin/ruby.exe" extconf.rb
D:/Program Files (x86)/Ruby200-x64/bin/ruby.exe: invalid switch in RUBYOPT: -F (
RuntimeError)

extconf failed, exit code 1

Gem files will remain installed in D:/Program Files (x86)/Ruby200-x64/lib/ruby/g
ems/2.0.0/gems/fast-stemmer-1.0.2 for inspection.
Results logged to D:/Program Files (x86)/Ruby200-x64/lib/ruby/gems/2.0.0/extensi
ons/x64-mingw32/2.0.0/fast-stemmer-1.0.2/gem_make.out
like image 848
Spy Avatar asked Mar 17 '14 16:03

Spy


2 Answers

I got this error while installing Jekyll on Linux (Mint 17, which is based on Ubuntu 14.04).

I eventually found the solution here. I needed both the ruby-dev package and nodejs (the latter due to a bug in Jekyll).

sudo apt-get install ruby ruby-dev make
sudo gem install jekyll --no-rdoc --no-ri
sudo apt-get install nodejs    
like image 99
user2225804 Avatar answered Oct 31 '22 00:10

user2225804


I ran into this problem too. Running the following installed Jekyll for me:

$ \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled

$ sudo gem install jekyll

This installs RVM, updates Rails and installs Jekyll.

BTW - Most of the posts I've found indicate it's a problem with Xcode not having the developer tools installed. I have a newer MacBook Pro on which this stuff was installed by default, so attempting to install the Xcode dev tools did nothing for me (unlike the above, which did everything I needed).

like image 35
SrBlanco Avatar answered Oct 30 '22 23:10

SrBlanco