Rails on OSX 10.11 El Capitan: Library not loaded: libmysqlclient.18.dylib

前端 未结 2 1338
后悔当初
后悔当初 2020-12-31 11:37

Since I upgraded OSX to 10.11, I can\'t use MySQL with my Rails app anymore:

$ rails s
/Users/josh/.rvm/gems/ruby-2.2.3@a4aa2/gems/activesupport-4.2.1/lib/ac         


        
2条回答
  •  萌比男神i
    2020-12-31 12:04

    i had the same problem just open terminal hit:

    sudo nano ~/.bash_profile
    

    paste the following lines:

    MYSQL=/usr/local/mysql/bin
    export PATH=$PATH:$MYSQL
    export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
    

    and thats it.

提交回复
热议问题