0

When I try to run the command "pod init" it gives me error command not found. After that I try to run the command "sudo gem install cocoapods" then it again gives me error "Failed to build gem native extension" with this message

current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.13.1/ext/ffi_c /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20200701-1901-10omoap.rb extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.13.1 for inspection. Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/ffi-1.13.1/gem_make.out.

I could not understand the problem.

My Xcode version is 11.3.

halfer
  • 19,824
  • 17
  • 99
  • 186
Romio Bera
  • 1
  • 1
  • 2
  • Duplicate https://stackoverflow.com/questions/20755044/how-to-install-cocoapods – El Tomato Jul 01 '20 at 09:54
  • I try this also but after running the command "sudo gem install cocoapods" it gives me other type of error which is not mention in this link. – Romio Bera Jul 01 '20 at 10:05
  • What is 'this'? – El Tomato Jul 01 '20 at 10:07
  • I remember having installed an older version. – El Tomato Jul 01 '20 at 10:08
  • When I run the command "sudo gem install cocoapods" it gives this error Error installing cocoapods: ERROR: Failed to build gem native extension. Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/ffi-1.13.1/gem_make.out – Romio Bera Jul 01 '20 at 10:27
  • If run the command "sudo gem install activesupport -v 4.2.6" it gives no error but after that if I run the command "pod setup" it again gives the error command not found – Romio Bera Jul 01 '20 at 10:29
  • In my opinion, the reference to `Library/Ruby` is a bad smell. The first thing to do is get out of the system's Ruby completely and install your own, e.g. with `rbenv`. Now you'll be in control of what gems there are, and you'll never have to say `sudo` again. – matt Jul 01 '20 at 18:45

0 Answers0