0

When typing

rvm install 2.6.0

I get this error:

file.c:23:10: fatal error: 'CoreFoundation/CFString.h' file not found
#include <CoreFoundation/CFString.h>
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~

I am on OSX 10.14.4

I have the newest version of Xcode installed (10.2).

How can I fix my system?

Here is a link to my other posts on the ruby mailing list: https://rubytalk.org/t/installing-ruby-with-rvm-cannot-find-corefoundation-cfstring-h/74982

Nick Gallimore
  • 1,222
  • 13
  • 31
  • Older versions of Ruby, like 2.3.x, may not work on newer versions of macOS. Have you tried 2.5.x? 2.6 is current and the most likely to install without issues as that's where everyone's attention is focused at the moment. – tadman Apr 10 '19 at 17:47
  • 1
    I just updated the question to show 2.6.0, it still does not work – Nick Gallimore Apr 10 '19 at 18:03
  • 2
    If `open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg` does not resolve your issue, and if completely removing brew and all installed brew packages followed by reinstalling brew (but NOT reinstalling your packages; allow the RVM installer to use brew to install anything it needs) does not resolve your issue then you should reinstall macOS from scratch and retry your operation. – anothermh Apr 10 '19 at 18:32
  • 1
    Please post output of both `rvm config-get` and `gem env` ? – lacostenycoder Apr 10 '19 at 18:38
  • @anothermh The pkg installed and rvm installs now! – Nick Gallimore Apr 10 '19 at 18:56
  • @lacostenycoder I want to make sure everything is correctly setup though between OSX ruby and the homebrew/rvm ruby. Here is the pastebin for the gem env: https://pastebin.com/raw/VXEPXgKq Here is the one for the rvm config-get: https://pastebin.com/raw/vSXRSEdp It is complaining about the PATH directory still. So I am afraid my path is still incorrect. – Nick Gallimore Apr 10 '19 at 18:58

1 Answers1

1

Open terminal and type:

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
anothermh
  • 9,815
  • 3
  • 33
  • 52
Nick Gallimore
  • 1,222
  • 13
  • 31
  • @anothermh seriously thank you so much I have been searching all week. Where did you find that command? I haven't seen it anywhere hopefully someone else will see it here that needs header files. – Nick Gallimore Apr 10 '19 at 19:11
  • 1
    [The last time you asked about this](https://stackoverflow.com/q/55525660/3784008) someone told you to read [this](https://rubytalk.org/t/installing-ruby-latest-on-mac-mojave-corefoundation-cfstring-h-not-found/74830/2) which links to [this](https://stackoverflow.com/q/52509602/3784008); you said "_I came across that post and it pretty much leads to a dead end_" which is odd because the top voted comment on that post (with 22 upvotes) and the [top voted answer](https://stackoverflow.com/a/52530212/3784008) on that post (with 144 upvotes) say to do exactly this. – anothermh Apr 10 '19 at 19:30
  • Wow I totally missed that command. I tried everything else that posts says. Either way the answer has around 5 possible solutions, and lots of text makes it very unclear which one reinstalls the header files. I went to apple’s website and downloaded a command line tools pkg and installed it and it did nothing. Same with reinstalling Xcode. – Nick Gallimore Apr 11 '19 at 12:18