Rails error installing mysql2 (mysql2-0.3.20)

后端 未结 5 1355
无人共我
无人共我 2021-02-04 04:15

I am trying to get a rails project up and running on my local machine. When I do bundle install

Fetching mysql2 0.3.20
Installing mysql2 0.3.20 with native ext         


        
5条回答
  •  佛祖请我去吃肉
    2021-02-04 05:06

    I faced the same issue when installing mysql2-0.3.21 on Mac pro.

    Below mentioned solution worked for me (run the below mentioned 3 commands in the terminal pointing to your project folder):

    brew install mysql
    
    gem install mysql2 -v '0.3.21' -- --srcdir=/usr/local/mysql/include
    
    bundle install
    

提交回复
热议问题