Installing mysql2 gem on Mac os x Lion

后端 未结 4 1134
广开言路
广开言路 2021-02-10 09:12

The other day I updated to Mac OSX Lion. It broke my rails install as I had to re complie mysql. While I have got that working reinstalling the mysql2 gem has become problematic

4条回答
  •  臣服心动
    2021-02-10 09:39

    Don't know if this will help, but lemme try.

    To make mysql2 gem working under my OSX Lion, running Ruby 1.8.7:

    Install mysql - Download mysql-5.5.14-osx10.6-x86_64

    Create an alias inside .bash_profile to mysql e MySQLCOM

    • alias mysql="/usr/local/mysql/bin/mysql"
    • alias mysqld="sudo /Library/StartupItems/MySQLCOM/MySQLCOM"

    Install gem 'mysql2', '0.3.6'

    Create this symbolic link:

    sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
    

提交回复
热议问题