0

I have updated xcode to 5.1 and install the command line tools from preference->downloads page. But when I try to install ruby gems (e.g. sqlite3, nokogiri), it gives errors like this:

*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

And then I checked the mkmf.log:

" -o conftest -I/Users/alun/.rvm/rubies/ruby-2.1.2/include/ruby-2.1.0/x86_64-darwin13.0 -I/Users/alun/.rvm/rubies/ruby-2.1.2/include/ruby-2.1.0/ruby/backward -I/Users/alun/.rvm/rubies/ruby-2.1.2/include/ruby-2.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -O3 -I/Users/travis/.sm/pkg/active/include -fPIC -mmacosx-version-min=10.7 -pipe  -Wno-error=unused-command-line-argument-hard-error-in-future conftest.c  -L. -L/Users/alun/.rvm/rubies/ruby-2.1.2/lib -lxml2   -arch x86_64   -lruby-static -framework CoreFoundation  -lpthread -ldl -lobjc  "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

I searched but didn't find similar mkmf.log It seems the build command doesn't specify gcc or any other things.

Cœur
  • 37,241
  • 25
  • 195
  • 267
you lun
  • 55
  • 1
  • 3
  • Same question, see this [solution](http://stackoverflow.com/questions/19697359/ruby-debug-could-not-create-makefile-due-to-some-reason-probably-lack-of-necess) – Mohamed Yakout Aug 20 '14 at 10:49
  • Thanks,but this link doesn't contain the same error in mkmf.log,so should be different problems – you lun Aug 20 '14 at 11:26

1 Answers1

0

Finally I've solved my problem, by reinstall xcode and command line tools, and then reinstall ruby with rvm

you lun
  • 55
  • 1
  • 3