7

An error occurred while installing json (1.8.1), and Bundler cannot continue. Make sure that gem install json -v '1.8.1' succeeds before bundling. xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

make failed, exit code 1

I know this has already been posted but i have tried bundle update, bundle install and putting the gem file in my gem file and bundle install but nothing works from the other answers.

ideas?

thatsmesofia
  • 167
  • 1
  • 2
  • 7

6 Answers6

23

Running "bundle update" worked for me.

Waqas
  • 901
  • 1
  • 8
  • 17
11

You can try bundle update && bundle install.
More on this here.

sonlexqt
  • 5,322
  • 4
  • 36
  • 55
10

A safer approach can be:
bundle update json
bundle install

Edgar Aviles
  • 111
  • 2
  • 6
  • 1
    This answer was already posted at least once. How is your solution any different? What makes it "safer"? – Cody Gray Oct 08 '17 at 08:41
4

Run the following in terminal:

xcode-select --install

Source

Community
  • 1
  • 1
phil pirozhkov
  • 4,530
  • 1
  • 32
  • 39
4

Remove your old Gemfile.lock file and run bundle again. A newer version of json should be installed.

Md Sirajus Salayhin
  • 4,684
  • 5
  • 31
  • 45
1

With Ruby 2.4.4, use Backup version 5.0.0.beta.1.

gem install backup -v5.0.0.beta.1

This solved the issue for me

Kirti
  • 11
  • 2