Skip to content

JSON Build error : 'ruby/config.h' file not found #255

Closed

Description

@deathmaster9

While trying to install json through gem i get the following error message.


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

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb

creating Makefile

make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby.h:33:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found

include "ruby/config.h"

     ^

1 error generated.
make: *** [generator.o] Error 1

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.3 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/json-1.8.3/ext/json/ext/generator/gem_make.out

Activity

  1. flori commented on Aug 17, 2015

    @flori
    Member

    Are you missing the devel package for ruby?

  2. deathmaster9 commented on Aug 17, 2015

    @deathmaster9
    Author

    It seems that it was a problem with the version of the "Command Line Tools (OS X 10.11) beta" install. Yesterday Apple released version 7 and it repaired the problem.

  3. ianfixes commented on Dec 19, 2016

    @ianfixes

    In some instances, you may try to run xcode-select --install, and receive the error can't download the software because of a network problem. And you know it's not the network because you're searching google for the problem.

    You'll need to re-download the appropriate version of the Xcode command line tools: https://developer.apple.com/download/more/?name=command%20line%20tools

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions