手順
- サーバーが動いていることを確認する
-
rails c
をする - irbの中で下記のActiveRecord〜を実行する
Rails 6.1以降
irb(main):001:0> ActiveRecord::Base.connection_db_config
# => #<ActiveRecord::DatabaseConfigurations::HashConfig:0x000000000 ...
Rails 6.0以前
irb(main):001:0> ActiveRecord::Base.connection_config
# => {:pool=>5, :timeout=>5000, :database=>"db/development.sqlite3", :adapter=>"sqlite3"}