admin管理员组文章数量:1244431
When I upgrade rails from 5.1.6 to 7.2 I have problem with database connection.
ActiveRecord::AdapterNotSpecified database configuration does not specify adapter
This is my database.yml
default: &default
adapter: mysql2
encoding: utf8mb4
pool: 10
username: root
socket: /tmp/mysql.sock
collation: utf8mb4_unicode_ci
database: my_db
host: localhost
reconnect: true
wait_timeout: 300
development:
primary:
<<: *default
primary_replica:
<<: *default
replica: true
my application_record.rb
connects_to database: {writing: :primary, reading: :primary_replica}
But when I connect to rails server it returns the above error. Why is this? It still seems to get connections from the development key even though I cleared the cache,..
版权声明:本文标题:Rails 7.2.2.1 ActiveRecord::AdapterNotSpecified - database configuration does not specify adapter: - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740180503a2237248.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论