๐ Rails ใง config/database.yml ใใใ ENV['DATABASE_URL'] ใฎ่จญๅฎใๅชๅ ใใใ่ฉฑ
MySQL ใๅฉ็จใใ Rails ใใญใธใงใฏใใ่ตทๅใใใใจใใใจใใใไธ่จใฎใจใฉใผใ็บ็ใใพใใใ bin/rails s # ใใผใฟใใผในใขใใใฟใผใซใฏ mysql2 ใ้ธๆใใฆใใ็ถๆ ใชใฎใซ postgresql ใงๆฅ็ถใใใใจใใฆใใ Error loading the 'postgresql' Active Record adapter. Missing a gem it depends on? pg is not part of the bundle. Add it to your Gemfile. (LoadError) # config/database.yml ใใกใคใซใฎไธญ่บซไธ้จๆ็ฒ # mysql2 ใใใผใฟใใผในใขใใใฟใผใจใใฆๅฉ็จใใฆใใใใใ # PostgreSQL ๆฅ็ถใฎใใใฎ pg ใฉใคใใฉใชใฎ่ฟฝๅ ใๆฑใใใจใฉใผใ็บ็ใใฆใใใฎใฏไฝใใใใใใใ default: &default adapter: mysql2 #... ไฝใงใใใใจๆใ Rails ใฎใใญใฅใกใณใใ่ชญใใงใใๆใๅ ฌๅผใตใคใใซ Connection Preference ใซ้ขใใ่จ่ฟฐใ่ฆใคใใพใใใ Since pool is not in the ENV[โDATABASE_URLโ] provided connection information its information is merged in. Since adapter is duplicate, the ENV[โDATABASE_URLโ] connection information wins. ...