【问题标题】:An error occurred while installing json (1.8.1), and Bundler cannot continue - Rails安装 json (1.8.1) 时出错,Bundler 无法继续 - Rails
【发布时间】:2017-04-08 04:15:40
【问题描述】:

安装 json (1.8.1) 时出错,Bundler 无法继续。 在捆绑之前确保gem install json -v '1.8.1' 成功。 xcrun: 错误: 无效的活动开发者路径 (/Library/Developer/CommandLineTools),缺少 xcrun 在: /Library/Developer/CommandLineTools/usr/bin/xcrun

制作失败,退出代码 1

我知道这已经发布,但我已经尝试过捆绑更新、捆绑安装并将 gem 文件放入我的 gem 文件和捆绑安装,但其他答案没有任何效果。

想法?

【问题讨论】:

    标签: ruby-on-rails json ruby github rubygems


    【解决方案1】:

    对于 Ruby 2.4.4,使用备份版本 5.0.0.beta.1。

    gem install backup -v5.0.0.beta.1

    这解决了我的问题

    【讨论】:

      【解决方案2】:

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

      【讨论】:

      • 此答案已至少发布一次。您的解决方案有何不同?是什么让它“更安全”?
      【解决方案3】:

      删除旧的 Gemfile.lock 文件并再次运行 bundle。应安装较新版本的 json。

      【讨论】:

        【解决方案4】:

        你可以试试bundle update && bundle install
        更多关于这个here

        【讨论】:

          【解决方案5】:

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

          【讨论】:

            【解决方案6】:

            在终端中运行以下命令:

            xcode-select --install
            

            Source

            【讨论】:

              猜你喜欢
              • 1970-01-01
              • 2023-03-06
              • 2018-09-08
              • 1970-01-01
              • 1970-01-01
              • 1970-01-01
              • 2016-03-14
              • 2022-01-20
              • 2017-02-09
              相关资源
              最近更新 更多