Ruby gem installation error after OSX Yosemite and Xcode 6 installation

前端 未结 2 987
暖寄归人
暖寄归人 2021-02-08 05:30

I tried installing a gem like I did before installing Yosemite, but now I\'m getting an error:

/Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:159:in `synchronize\': E

相关标签:
2条回答
  • 2021-02-08 06:24

    I had a same problem when I installed mysql via bitnami, Looks like you do not have all required mysql libraries .

    I used brewsh and reinstalled mysql by

    brew install mysql
    
    sudo gem install mysql2
    

    Also you need to load the dynamic library in your .profile file in the home directory, you can achieve this by adding these lines in .profile file .

    export PATH=$PATH:$MYSQL
    export DYLD_LIBRARY_PATH=/Applications/mysql/lib:$DYLD_LIBRARY_PATH
    

    In the above two lines of code

    /Applications/mysql/lib , is the path where your mysql libraries are installed , in yours it might be different please check and use as per your environment

    0 讨论(0)
  • 2021-02-08 06:28

    I had the same issue. Downgrading to ruby 1.9.3 with RVM fixed the issue for me on 10.10 Yosemite - here are the steps taken:

    $ \curl -sSL https://get.rvm.io | bash
    $ source /Users/shedali/.rvm/scripts/rvm
    $ rvm install 1.9.3 --with-gcc=clang
    $ gem install [packagename]
    
    0 讨论(0)
提交回复
热议问题