ActiveRecord::AdapterNotSpecified database configuration does not specify adapter
For you app to work locally you need to:
- Install Postgresql on your machine
- Create a database for your development needs (let's call it
my_app_development
) Change your
database.yml
to:default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: 5
development:
<<: *default
database: my_app_developmentrun
rake db:migrate
Rails 6 on Heroku: ActiveRecord::AdapterNotSpecified: database configuration does not specify adapter
The problem has been solved by adding the 'adapter' to 'production' in the database.yml. This wasn't necessary when our project was on Rails 4 and 5.
production:
adapter: postgresql
Database configuration does not specify adapter (Sinatra + Heroku + Activerecord)
I had the same problem today, and contacted Heroku support for assistance.
They directed me to a recent change in their Ruby build pack, see here: https://devcenter.heroku.com/changelog-items/709
I updated my database.yml file to reflect the change, and reference the DATABASE_URL for production, and my app is deploying again.
production:
url: <%= ENV['DATABASE_URL'] %>
Related Topics
How to Automate Chrome Request Blocking Using Selenium-Webdriver for Ruby
How to Say Something Happened "X Minutes Ago" or "X Hours Ago" or "X Days Ago" in Ruby
What's the Difference Between Colon ":" and Fat Arrow "=>"
Convert Time to Other Timezone
Equivalent of "Continue" in Ruby
Can Someone Explain the Class.Superclass.Class.Superclass Paradox
Rails 4 Turbolinks with Google Analytics
What's the Best Way to Handle Exceptions from Net::Http
Rails and Os X: How to Install Rmagick
Why Can't a Variable Name End with '' While a Method Name Can
How to Set Http_Referer When Testing in Rails
How to Install JSON Gem - Failed to Build Gem Native Extension(MAC 10.10)
Rails, Postgresql, and History Triggers
Tell Ruby Program to Wait Some Amount of Time
Ruby: How to Iterate Over a Range, But in Set Increments
How to Get the Name of the Command Called for Usage Prompts in Ruby