简体   繁体   中英

Missing mysql2 gem Amazon Web Services EC2 error

When I try to open my site it gives me this error.

!!! Missing the mysql2 gem. Add it to your Gemfile: gem 'mysql2'

I have added it to my Gemfile, but still no avail. And changed all my adapters to mysql2 in the database.yml

Running Rails 3.0.7 Ruby 1.8.7 enterprise

You may be getting this error because the latest mysql2 gem doesn't contain the ActiveRecord adaptor (they've excluded it because Rails 3.1 has it built into ActiveRecord).

You should require the old version of mysql2 in your gemfile:

gem 'mysql2', "~> 0.2.7"

This is as per instructions in mysql2 README doc

The problem was that my database say it was called dog but it displayed as Dog so I had to configure database.yml to change it to dog. – Andy 0 secs ago edit

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM