我正在從C9部署小應用到github,然後到Heroku! 在heroku部署儀表板中,它表示它已部署,但是當我打開應用程序時,它只是給了我錯誤信息。 所以我搜索了很多Stackoverflow的答案,並且遵循Heroku網站(https://devcenter.heroku.com/articles/sqlite3)的方向去除sqlite3並安裝了gem頁面。RoR中的heroku部署錯誤(Github部署)我應該如何處理postgresql錯誤?
我做了更換寶石「sqlite3的」創業板「PG」,做「包安裝」,然後
它說我需要我的config/database.yml文件進行轉換,所以我取代了它是這樣的:
development:
adapter: postgresql
database: my_database_development
pool: 5
timeout: 5000
test:
adapter: postgresql
database: my_database_test
pool: 5
timeout: 5000
production:
adapter: postgresql
database: my_database_production
pool: 5
timeout: 5000
,然後當我回來C9 bash和類型 '耙分貝:創建', 它顯示我
**rake aborted!
ActiveRecord::NoDatabaseError: FATAL: database "my_database_development" does not exist**
此錯誤。
有人說「束EXEC耙分貝:設置」會的工作,所以我做到了,那麼就說明
**Couldn't create database for {"adapter"=>"postgresql", "database"=>"my_database_test", "pool"=>5, "timeout"=>5000}
/home/ubuntu/workspace/db/schema.rb doesn't exist yet. Run `rake db:migrate` to create it, then try again. If you do not intend to use a database, you should instead alter /home/ubuntu/workspace/config/application.rb to limit the frameworks that will be loaded.**
我不知道如何來這條消息的反應....當我輸入'rake db:migrate',並再次顯示。
rake aborted!
ActiveRecord::NoDatabaseError: FATAL: database "my_database_development" does not exist
我沒有使用數據庫,所以也許我可以嘗試'config/application.rb'文件,但我應該怎麼做?
'耙分貝:create'然後'耙分貝:migrate' – Emu
我沒有 '耙分貝:創建' 已經,沒有工作,我已經寫了... – Mia
'rake db:reset' –