Installing mysql2 gem for Ruby on Rails with Mac OSX 10.6

后端 未结 12 1124
悲哀的现实
悲哀的现实 2020-12-09 02:56

I am having a problem installing the mysql2 gem.

This comes up when I do gem install mysql2:

Marks-MacBook-Pro:~ Mark$ gem install mysql         


        
12条回答
  •  感情败类
    2020-12-09 03:12

    To fix for a manual gem install:

    brew install openssl
    gem install mysql2 -- --with-opt-dir="$(brew --prefix openssl)"
    

    To fix for all bundle installs:

    brew install openssl
    bundle config --global build.mysql2 --with-opt-dir="$(brew --prefix openssl)"
    bundle install
    

提交回复
热议问题