【问题标题】:Getting following error An error occurred while installing json (1.8.1), and Bundler cannot continue出现以下错误安装 json (1.8.1) 时发生错误,并且 Bundler 无法继续
【发布时间】:2014-01-19 04:55:31
【问题描述】:

我正在尝试创建一个新的 Rails 应用程序。但是在运行 bundle install 时出现以下错误:

安装 json (1.8.1) 时出错,Bundler 无法继续。

我尝试了各种选项,例如 xcode-select --install、rm -rf test,如之前提出的问题中所给出的,但没有成功。

请帮我解决这个问题。因为这个错误,我被卡住了。

【问题讨论】:

    标签: ruby-on-rails json xcode bundler


    【解决方案1】:

    如果您使用的是 MacOS X 10.8,xcode 会出现问题。您可以尝试使用本手册解决问题:http://robots.thoughtbot.com/the-hitchhikers-guide-to-riding-a-mountain-lion

    此外,超级用户可能存在问题。尝试使用 sudo 安装 json。

    sudo gem install json -v '1.8.1'
    

    【讨论】:

    • 我之前尝试过 sudo gem install json -v '1.8.1' 但没有成功。但现在它奏效了。 :) 感谢您的帮助。
    猜你喜欢
    • 1970-01-01
    • 2017-04-08
    • 1970-01-01
    • 2018-09-08
    • 1970-01-01
    • 1970-01-01
    • 2013-02-18
    • 2023-03-06
    • 2016-03-14
    相关资源
    最近更新 更多