1
這是我的database.yml:PostgreSQL的認證失敗
development:
adapter: postgresql
database: myUsername
username: myUsername
password: myPassword
host: localhost
所以,當我去我的本地網頁,顯示沒有錯誤。如果我在database.yml中更改密碼的東西不正確,我得到
PG::ConnectionBad: FATAL: password authentication failed for user "myUsername" FATAL: password authentication failed for user "myUsername"
錯誤。因此,我的密碼是正確的。
但儘管如此,當我運行
rake db:migrate
我得到的錯誤不管我的密碼是對還是錯。如果它是正確的,我得到以下錯誤:
PG::ConnectionBad: fe_sendauth: no password supplied
如果這是錯的,我得到了同樣的錯誤我本地的網頁上:
PG::ConnectionBad: FATAL: password authentication failed for user "myUsername" FATAL: password authentication failed for user "myUsername"
是什麼原因導致它認爲正確的密碼是「不供應「?請任何幫助或信息表示讚賞,我已經搞了兩天了。