Please install mysql adapter 'gem install activerecord-mysql-adapter'

前端 未结 16 1466
挽巷
挽巷 2020-12-28 12:23

I\'m having trouble finding a solution to this problem. I\'m getting the error:

Please install the mysql adapter: \'gem install activerecord-mysql-adapter\'
         


        
16条回答
  •  感情败类
    2020-12-28 12:59

    I never would have believed it but deleting my database.yml file and recreating it actually solved the problem for me too. Thanks Tyler. I spent hours installing and uninstalling different versions of the gems mysql, mysql2, activerecord-mysql-adapter, etc... In the end, my gemfile has

    gem 'mysql2', "~>0.3.11"
    

    and my database.yml file has

    adapter: mysql2
    

    I am on OSX 10.8, rails 3.2.8, and ruby 1.9.3.

    By the way, I experienced the same issues with the mysql2 adapter on my Windows 7 machine. Uninstalling and even deleting the directory for the activerecord-mysql-adapter gem seemed to be critical as well.

提交回复
热议问题