Installing mysql2 gem for Ruby on Rails with Mac OSX 10.6

后端 未结 12 1141
悲哀的现实
悲哀的现实 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:17

    I had the exact same issue and errors trying to install mysql2. I thought my mamp install of MySQL would work fine and spent a few hours playing around with paths to get that to work - no success.

    Finally came across this post from ALoR and installed a fresh version through homebrew - however - be sure to follow ALL the instructions from homebrew! I missed a few steps and wasted another hour tracking down that problem - here are those instructions: https://stackoverflow.com/a/11061487/1241271

    After MySQL was successfully installed, I ran: sudo gem install mysql2 and it worked like a charm.

    Hope this helps someone from wasting several hours because they neglected to read the docs (newb mistake).

提交回复
热议问题