Ruby Gem install Json fails on Mavericks and Xcode 5.1 - unknown argument: '-multiply_definedsuppress'

前端 未结 11 1638
醉酒成梦
醉酒成梦 2020-11-22 03:39

I was trying run gem install json and got the following error

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /System/Library/Framewo         


        
11条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-22 04:24

    To address the issue you can install the most recent version of ruby as described by @Sash. You can use the following commands to do so. In case you already have installed rvm, you don't need to reinstall it.

    #Install rvm
    \curl -sSL https://get.rvm.io | bash -s stable
    
    #Install ruby version 2.0.0-p451
    rvm install ruby-2.0.0-p451
    
    #Print ruby version to verify that it was installed successfully
    ruby -v
    
    #Install json gem
    sudo gem install json
    

提交回复
热议问题