Im trying to setup ruby on local and I am running into some issues.
1. When i run ‘bundle install’ , the following error occur
Installing json 2.6.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
fatal error: ‘ruby/config.h’ file not found
#include “ruby/config.h”
^~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10:
note: did not find header ‘config.h’ in framework ‘ruby’ (loaded from
‘/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks’)
1 error generated.
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/**/.gem/gems/json-2.6.1 for inspection.
Results logged to
/Users/****/.gem/extensions/universal-darwin-21/2.6.0/json-2.6.1/gem_make.out
An error occurred while installing json (2.6.1), and Bundler cannot continue.
In Gemfile:
coveralls was resolved to 0.8.23, which depends on
simplecov was resolved to 0.16.1, which depends on
json
==============
2. Then i executed ‘gem install json’, the following error occurred
Building native extensions. This could take a while…
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
1 error generated.
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/**/.gem/gems/json-2.6.1 for inspection.
Results logged to /Users/****/.gem/extensions/universal-darwin-21/2.6.0/json-2.6.1/gem_make.out
- I am using macOS 12.2.1
- ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]
- bundler version 2.3.9
- gem version 3.3.9
Any help would be great.
Thanks