简体   繁体   中英

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 (/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?

运行“捆绑更新”对我有用。

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

更安全的方法可以是:
bundle update json
bundle install

Run the following in terminal:

xcode-select --install

Source

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM