Failure to install old mysql2 gem

后端 未结 2 650
春和景丽
春和景丽 2021-02-08 03:41

I am using Mac High Sierra. I am using Ruby 2.2.1 with RVM. I need to use mysql2 with this Ruby on Rails app. I do have mysql 5.7 installed. I do have xcode installed along with

相关标签:
2条回答
  • 2021-02-08 04:05

    This fixed it for me

    gem install mysql2 -v '0.3.21' -- --with-cflags=\"-I/usr/local/opt/openssl/include\" --with-ldflags=\"-L/usr/local/opt/openssl/lib\"
    

    after installing openssl

    brew install openssl
    
    0 讨论(0)
  • 2021-02-08 04:10

    As per the description shared it seems like the mysql dependencies are unable to install.

    First we need to ‘locate mysql_config’ and then replace the path in the following command with where that file is.

    gem install mysql2 -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
    
    0 讨论(0)
提交回复
热议问题