rails error on macos mojave 10.14.5: config/load_config.rb:5:in `require': cannot load such file -- configurate (LoadError) Im trying to install ruby and rails on macos using rbenv.

On running rails new myapp and rails -v

it gives error: 

5: from bin/rails:8:in `&lt;main&gt;'
4: from bin/rails:8:in `require_relative'
3: from /Users/jagtarsingh/config/boot.rb:8:in `&lt;top (required)&gt;'
2: from /Users/jagtarsingh/config/boot.rb:8:in `require_relative'
1: from /Users/jagtarsingh/config/load_config.rb:5:in `&lt;top (required)&gt;'/Users/jagtarsingh/config/load_config.rb:5:in `require': cannot load such file -- configurate (LoadError)


Im following these sources

http://guides.railsgirls.com/install#setup-for-os-x
https://gorails.com/setup/osx/10.14-mojave

I don't have a good search term that can help me figure out this error. Where might I start to research or diagnose this?
That guide is very polished and super close to getting you an install, but I fear it isn't sufficient to get rails running.

The two things I've been able to reproduce is the rbenv isn't calling the proper version of gem to get rails installed and even after you rehash things, rails is still being called from /usr/bin and not where homebrew and rbenv are stashing the non-system version of these tools.

To check which location in your PATH the key tools are being called:

which ruby gem rails rbenv


On a clean system, you would see this:

$ which ruby gem rails rbenv
/usr/bin/ruby
/usr/bin/gem
/usr/bin/rails


After following that instructions, your gem is still not calling the /usr/local version so you're installing rails against the system framework and not the intended one. I don't have a full solution yet, but this might help someone that knows how to search for the gem command to get us both other this error in the install guide and not have to pick apart the scripts to figure what other steps are needed.