Linux中,安装mysql gem可能会遇到“ERROR:Failed to build gem native extension”这个问题,在stackoverflow上看到,在安装这个gem之前,还需要安装libmysql-ruby和libmysqlclient-dev,以下仅供参考:

  sudo apt-get install libmysql-ruby libmysqlclient-dev

  sudo gem install mysql