Reputation:
In my gemfile:
group :development, :test,:production do
gem 'mysql2', '~> 0.3.16'
end
In logs:
$ 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 have added "cleardb" add-on for the application.And now i want to use it.But, i am not able to migrate to database as i am getting above error.
Upvotes: 4
Views: 2305
Reputation: 1595
When you set your DATABASE_URL
, you need to specify to use mysql2://
instead of mysql://
Something like this:
heroku config:set DATABASE_URL='mysql2://adffdadf2341:[email protected]/heroku_db?reconnect=true'
Upvotes: 8