Installing ruby with RVM cannot find <CoreFoundation/CFString.h>

Apologies for asking an uninteresting question, I am currently trying to
learn ruby for a senior capstone project by creating a RESTFUL api with it.
I have been trying to install ruby using rvm for a week now and I have had
little success. Both rvm and rbenv complain about not being able to find
CoreFoundation/CFString.h on OSX. I know this is more of a question related
specifically to my machine, but how can I fix my machine? I have posted on
Apple forums, stackoverflow 3-4 times, etc., not sure where else to go from
here.

I am on OSX 10.14.4 with XCode 2.2 installed. More detailed information can
be viewed in the forum posts linked below.

I have homebrew and I am worried about having two versions of ruby
conflicting with it.

Here is my post on apple's forums:

https://forums.developer.apple.com/thread/115518

StackOverflow:

I'm having issues right now with multiple ruby versions being installed
(the osx one and the homebrew one I think). For example with rails right
now trying to generate a new model I get:

/usr/local/Cellar/ruby/2.6.2/lib/ruby/2.6.0/bundler/lockfile_parser.rb:108:in
`warn_for_outdated_bundler_version': *You must use Bundler 2 or greater
with this lockfile. (**Bundler::LockfileError**)*

Yet I have bundler 2.0 installed. Are there any grand master ruby wizards
out there that can give me some guidance.

Basically I just want to ignore the OSX version of ruby (and leave it
unchanged), and manage one using rvm where I can change the version based
on what tutorial I am using (or even just maybe let it stay at the newest
up to date one).

If I type ruby -v I get 2.6.2
But if I generate a new project with rails for an api, the gemfile
automatically goes to 2.3.7 and I have problems.

Thank you,

Nicholas Gallimore

Hello,

  Sorry I have no answer. I'd suggest trying a post on the ruby reddit
(see https://old.reddit.com/r/ruby ). All the best. Good luck. Happy
coding with ruby (soon).

Hello Nicholas,

   I see (from reading the stackoverflow answers) that you're up and
running Why not post the fix here so others know that you're no
longer looking for an answer?. Anyways, just really talking to
myself.

   Happy coding with ruby.

Hello Nicholas Gallimore,

Seams like you installed ruby with HomeBrew. It's not multiple ruby version. Its Inheritance. Every time you update there will be old code of old ruby version inside it. So Don’t very about it.

Yes you are getting error inside rails because you are not using correct ruby with correct rails version.

I am more of a RVM user, So I can suggest to use RVM for managing ruby by simple commands:

$ rvm install ruby-2.6.2 --default
$ rvm gemset create name_of_project
$ gem gemset use name_of_project
$ gem install bundler
$ gem install rails
$

You can also manage ruby versions form rvmrc file

So that you need not to switch ruby version every time, but latest rvm switch between automatic hence, you can use ramrc file in a much better way.

Always install bundler first then rails for version stability.

I hope your problem get solved by this.

Thank You,
Romanch Sharma
Self Taught :slight_smile:

···

On 10-Apr-2019, at 11:49 PM, Nick Gallimore <nfgallimore@gmail.com> wrote:

Apologies for asking an uninteresting question, I am currently trying to learn ruby for a senior capstone project by creating a RESTFUL api with it. I have been trying to install ruby using rvm for a week now and I have had little success. Both rvm and rbenv complain about not being able to find CoreFoundation/CFString.h on OSX. I know this is more of a question related specifically to my machine, but how can I fix my machine? I have posted on Apple forums, stackoverflow 3-4 times, etc., not sure where else to go from here.

I am on OSX 10.14.4 with XCode 2.2 installed. More detailed information can be viewed in the forum posts linked below.

I have homebrew and I am worried about having two versions of ruby conflicting with it.

Here is my post on apple's forums:

https://forums.developer.apple.com/thread/115518

StackOverflow:

Installing Ruby 2.3.1 on Mojave OSX with rbenv or rvm - Stack Overflow

macos - Installing ruby with RVM cannot find <CoreFoundation/CFString.h> - Stack Overflow <macos - Installing ruby with RVM cannot find <CoreFoundation/CFString.h> - Stack Overflow;

I'm having issues right now with multiple ruby versions being installed (the osx one and the homebrew one I think). For example with rails right now trying to generate a new model I get:

/usr/local/Cellar/ruby/2.6.2/lib/ruby/2.6.0/bundler/lockfile_parser.rb:108:in `warn_for_outdated_bundler_version': You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)

Yet I have bundler 2.0 installed. Are there any grand master ruby wizards out there that can give me some guidance.

Basically I just want to ignore the OSX version of ruby (and leave it unchanged), and manage one using rvm where I can change the version based on what tutorial I am using (or even just maybe let it stay at the newest up to date one).

If I type ruby -v I get 2.6.2
But if I generate a new project with rails for an api, the gemfile automatically goes to 2.3.7 and I have problems.

Thank you,

Nicholas Gallimore

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Thank you all for your help! I was really having a hard time trying to
figure out how to get the header files. This command solves the problem:

open /Library/Developer/CommandLineTools/Packages/
macOS_SDK_headers_for_macOS_10.14.pkg

Also as far as conflicting version of ruby, I uninstalled the one with
homebrew by typing "brew uninstall ruby" then proceeded to install ruby
with "rvm install 6.2.0"

···

On Thu, Apr 11, 2019 at 5:54 AM romanch sharma <romanchsharma@icloud.com> wrote:

Hello Nicholas Gallimore,

Seams like you installed ruby with HomeBrew. It's not multiple ruby
version. Its Inheritance. Every time you update there will be old code of
old ruby version inside it. So Don’t very about it.

Yes you are getting error inside rails because you are not using correct
ruby with correct rails version.

I am more of a RVM user, So I can suggest to use RVM for managing ruby by
simple commands:

$ rvm install ruby-2.6.2 --default
$ rvm gemset create name_of_project
$ gem gemset use name_of_project
$ gem install bundler
$ gem install rails
$

You can also manage ruby versions form *rvmrc file*

So that you need not to switch ruby version every time, but latest rvm
switch between automatic hence, you can use ramrc file in a much better way.

*Always install bundler first then rails for version stability.*

I hope your problem get solved by this.

Thank You,
Romanch Sharma
Self Taught :slight_smile:

On 10-Apr-2019, at 11:49 PM, Nick Gallimore <nfgallimore@gmail.com> wrote:

Apologies for asking an uninteresting question, I am currently trying to
learn ruby for a senior capstone project by creating a RESTFUL api with it.
I have been trying to install ruby using rvm for a week now and I have had
little success. Both rvm and rbenv complain about not being able to find
CoreFoundation/CFString.h on OSX. I know this is more of a question related
specifically to my machine, but how can I fix my machine? I have posted on
Apple forums, stackoverflow 3-4 times, etc., not sure where else to go from
here.

I am on OSX 10.14.4 with XCode 2.2 installed. More detailed information
can be viewed in the forum posts linked below.

I have homebrew and I am worried about having two versions of ruby
conflicting with it.

Here is my post on apple's forums:

https://forums.developer.apple.com/thread/115518

StackOverflow:

Installing Ruby 2.3.1 on Mojave OSX with rbenv or rvm - Stack Overflow

macos - Installing ruby with RVM cannot find <CoreFoundation/CFString.h> - Stack Overflow

I'm having issues right now with multiple ruby versions being installed
(the osx one and the homebrew one I think). For example with rails right
now trying to generate a new model I get:

/usr/local/Cellar/ruby/2.6.2/lib/ruby/2.6.0/bundler/lockfile_parser.rb:108:in
`warn_for_outdated_bundler_version': *You must use Bundler 2 or greater
with this lockfile. (**Bundler::LockfileError**)*

Yet I have bundler 2.0 installed. Are there any grand master ruby wizards
out there that can give me some guidance.

Basically I just want to ignore the OSX version of ruby (and leave it
unchanged), and manage one using rvm where I can change the version based
on what tutorial I am using (or even just maybe let it stay at the newest
up to date one).

If I type ruby -v I get 2.6.2
But if I generate a new project with rails for an api, the gemfile
automatically goes to 2.3.7 and I have problems.

Thank you,

Nicholas Gallimore

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe
<ruby-talk-request@ruby-lang.org?subject=unsubscribe>>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;