mysql2 gem installation on linux

后端 未结 2 661
长发绾君心
长发绾君心 2021-02-10 02:07

I am trying to install a gem on linux but it is giving me an error:

An error occured while installing mysql2 (0.3.11), and Bundler cannot continue.
Make sure tha         


        
2条回答
  •  春和景丽
    2021-02-10 02:59

    Probably, it can't build mysql2 native extension.

    If you're using Ubuntu 14.04 or newer, try sudo apt-get install ruby-mysql libmysqlclient-dev.

    On older versions of Ubuntu install this: sudo apt-get install libmysql-ruby libmysqlclient-dev

    On OS X: brew install mysql

    There are also similar questions: 1, 2, 3.

提交回复
热议问题