0

這是我的第一個VPS和第一個鐵軌項目。Postgres數據庫說數據庫存在,但我不能Alter所有者

裏面的Postgres控制檯:

postgres=# \list 
            List of databases 
     Name  | Owner | Encoding | Collate | Ctype | Access privileges 
-----------------+----------+----------+-------------+-------------+----------------------- 
blog_production | blog  | UTF8  | en_US.UTF-8 | en_US.UTF-8 | 
postgres  | postgres | UTF8  | en_US.UTF-8 | en_US.UTF-8 | 
template0  | postgres | UTF8  | en_US.UTF-8 | en_US.UTF-8 | =c/postgres   + 
       |   |   |    |    | postgres=CTc/postgres 
template1  | postgres | UTF8  | en_US.UTF-8 | en_US.UTF-8 | =c/postgres   + 
       |   |   |    |    | postgres=CTc/postgres 
(4 rows) 

postgres=# ALTER DATABASE blog_development OWNER TO watashi; 
ERROR: database "blog_development" does not exist 

怎樣纔不是當它明明就是名單上的存在嗎?我怎樣才能放棄這個數據庫?如果我可以傷害我的VPS?

鏈接的網站是:www.morningharwood.com 它不出錯,直到www.morningharwood.com/works

+0

它需要一個semicolen –

回答

2

的Rails找不到works表,它應該已創建爲您RAILS_ENV=production bundle exec rake db:migrate命令的一部分,究竟是什麼,它的輸出?

還要檢查您是否正在生產模式下運行rails服務器。

+0

我相信不認爲我爲我的VPS創建了一個數據庫...你知道這個命令嗎? –

+0

我經歷的教程只是通過帽子部署工作進行了連接,但我很糟糕,我甚至不知道如何創建postgres數據庫......我知道我必須創建它......讓一個所有者然後吸引所有者到數據庫然後遷移是啊?有什麼我失蹤 –

+0

當我進入Postgres並運行\ dt我沒有關係;這意味着沒有數據庫是啊? –

相關問題