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 `<main>'
4: from bin/rails:8:in `require_relative'
3: from /Users/jagtarsingh/config/boot.rb:8:in `<top (required)>'
2: from /Users/jagtarsingh/config/boot.rb:8:in `require_relative'
1: from /Users/jagtarsingh/config/load_config.rb:5:in `<top (required)>'/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

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.

  • $ which ruby gem rails rbenv /Users/jagtarsingh/.rbenv/shims/ruby /Users/jagtarsingh/.rbenv/shims/gem /Users/jagtarsingh/.rbenv/shims/rails /usr/local/bin/rbenv – jagtar Jul 6 '19 at 17:41
  • And rails -v still shows an error @jagtar – bmike Jul 6 '19 at 17:47
  • yea, both rails -v & rails new myapp – jagtar Jul 6 '19 at 17:52
  • You might need to show he result of rerunning the rails install output. I’m guessing you have errors. I did following the guide. Set aside the app until rails can spit a version correctly. We know your app will fail if the base install isn’t done. – bmike Jul 6 '19 at 17:53
  • 1
    I have uninstalled the rbenv and rebooted the machine and reinstalled it worked. – jagtar Jul 7 '19 at 5:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .