Skip to content

Instantly share code, notes, and snippets.

@dstufft
Created March 15, 2012 00:04
Show Gist options
  • Save dstufft/2040568 to your computer and use it in GitHub Desktop.
Save dstufft/2040568 to your computer and use it in GitHub Desktop.
Installing rb-fsevent (0.4.3.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/Cellar/ruby/1.9.2-p290/bin/ruby extconf.rb
creating Makefile
CFLAGS='-isysroot /Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -mdynamic-no-pic -std=gnu99 -Os -pipe -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value -Wuninitialized -Wunknown-pragmas -Wshadow -Wfour-char-constants -Wsign-compare -Wnewline-eof -Wconversion -Wshorten-64-to-32 -Wglobal-constructors -pedantic' /usr/bin/clang -isysroot /Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -mdynamic-no-pic -std=gnu99 -dead_strip -framework CoreServices -o '/usr/local/lib/ruby/gems/1.9.1/gems/rb-fsevent-0.4.3.1/bin/fsevent_watch' fsevent/fsevent_watch.c
fsevent/fsevent_watch.c:1:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^
1 error generated.
extconf.rb:59:in `<main>': Compilation of fsevent_watch failed (see README) (RuntimeError)
Gem files will remain installed in /usr/local/Cellar/ruby/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rb-fsevent-0.4.3.1 for inspection.
Results logged to /usr/local/Cellar/ruby/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rb-fsevent-0.4.3.1/ext/gem_make.out
An error occured while installing rb-fsevent (0.4.3.1), and Bundler cannot continue.
Make sure that `gem install rb-fsevent -v '0.4.3.1'` succeeds before bundling.
@kalbasit
Copy link

Have you found a solution for this one ?

@steipete
Copy link

steipete commented Apr 5, 2012

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/

@kastman
Copy link

kastman commented Apr 12, 2012

+1 for steipete's answer; I think this may have happened because I first installed the command line tools and then installed a full Xcode on top of it; you just have to tell Xcode where to look.

@Lovatt
Copy link

Lovatt commented May 7, 2012

Thanks steipete!

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