An error occurred while installing json (1.8.1), and Bundler cannot continue - Rails

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 (/Libr...