Gem :: LoadError: Specified "mysql" for the database adapter, but the gem is not loaded

In my gemfile:

group :development, :test,:production do gem 'mysql2', '~> 0.3.16' end

In the magazines:

$ heroku run rake db:migrate

Running rake db:migrate attached to terminal... up, run.3758 rake aborted!

Gem::LoadError: Specified 'mysql' for database adapter, but the gem is not loaded. Add gem 'mysql' to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).

I added the addition of "cleardb" for the application. And now I want to use it. But I can not go to the database, as I get the above errors.

+4
source share
1 answer

When you install DATABASE_URL, you need to specify to use mysql2://insteadmysql://

Something like that:

heroku config:set DATABASE_URL='mysql2://adffdadf2341:adf4234@us-cdbr-east.cleardb.com/heroku_db?reconnect=true'

+6
source

All Articles