Skip to content

Instantly share code, notes, and snippets.

@mikesjewett
Created December 18, 2013 00:12
Show Gist options
  • Save mikesjewett/8015187 to your computer and use it in GitHub Desktop.
Save mikesjewett/8015187 to your computer and use it in GitHub Desktop.
Jekyll troubleshooting

Ran into a minor problem installing Jekyll. Not sure why it happened, but here's the situation and the fix:

➜  code  sudo gem install jekyll
Password:
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
	ERROR: Failed to build gem native extension.

    /Users/mike/.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb
creating Makefile

make "DESTDIR="
compiling porter.c
make: gcc-4.2: No such file or directory
make: *** [porter.o] Error 1


Gem files will remain installed in /Users/mike/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /Users/mike/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/fast-stemmer-1.0.2/ext/gem_make.out

This is not an uncommon problem (as Googling would prove). Lots of different answers out there, but just one worked for me. First make sure your bundler is up to date:

➜  code  sudo gem update --system

...then symlink gcc to 4.2 so bundler can find the necessary make file:

➜  code  sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2

That did it for me - ran sudo gem install jekyll and it worked fine.

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