我一直在學習rails一個月左右,我創建了我的第一個簡單的靜態網站在rails上使用ruby。它在localhost:3000
上運行良好。爲什麼我的網站不部署在heroku上?
我已將所有文件推送到GitHub上,並且已經關注瞭如何使用GitHub和heroku部署網站的幾個Youtube視頻。我用它們來解決我得到的幾個錯誤,並最終設法「部署」該網站。
但是,我所得到的只是一種歡迎頁面,表示這是我的網站。它只是一個只有「Heroku」的頁面,歡迎使用您的新應用。寫在它上面。我失蹤的最後階段是什麼?爲什麼我沒有看到我的網站?
下面是應用程序日誌:
2017-03-22T20:20:58.057644+00:00 app[api]: Release v1 created by user *******@******.com
2017-03-22T20:20:58.063330+00:00 app[api]: Release v2 created by user *******@******.com
2017-03-22T20:20:58.189041+00:00 app[api]: Release v2 created by user *******@******.com
2017-03-22T20:31:55.915631+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=vast-shelf-39597.herokuapp.com request_id=d69fedea-d149-4836-b349-aa490c3b9654 fwd="88.11.201.253" dyno= connect= service= status=502 bytes= protocol=https
2017-03-22T20:31:56.290278+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=vast-shelf-39597.herokuapp.com request_id=0c5752c0-b960-443e-8f07-0c2346055ff9 fwd="88.11.201.253" dyno= connect= service= status=502 bytes= protocol=https
2017-03-24T18:44:37.424270+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=vast-shelf-39597.herokuapp.com request_id=62e3ddce-34e5-4fb2-892b-2ae9cf5ca93d fwd="88.11.201.253" dyno= connect= service= status=502 bytes= protocol=https
2017-03-24T18:44:37.811237+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=vast-shelf-39597.herokuapp.com request_id=7a5b7d99-1b83-406d-bdc2-c68c3d5efa33 fwd="88.11.201.253" dyno= connect= service= status=502 bytes= protocol=https
2017-03-24T18:44:55.237261+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=vast-shelf-39597.herokuapp.com request_id=4057726f-e2b9-464b-a970-b37306051e63 fwd="88.11.201.253" dyno= connect= service= status=502 bytes= protocol=https
2017-03-25T20:29:38.837541+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=vast-shelf-39597.herokuapp.com request_id=47282fae-e30f-43d1-be52-808c956cad7b fwd="88.11.201.253" dyno= connect= service= status=502 bytes= protocol=https
2017-03-25T21:10:30.120292+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=vast-shelf-39597.herokuapp.com request_id=94863f09-962f-49d5-90db-c0fbf7ac0c8a fwd="88.11.201.253" dyno= connect= service= status=502 bytes= protocol=https
2017-03-26T11:07:07.914421+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=vast-shelf-39597.herokuapp.com request_id=c3fac4f9-8786-493c-a859-05690842ca89 fwd="88.11.201.253" dyno= connect= service= status=502 bytes= protocol=https
這裏是我的路線文件:我認爲有一些與「根」的缺失,不是嗎?
Rails.application.routes.draw do
get 'handm/home'
get 'handm/about'
get 'handm/contact'
get 'handm/industries'
get 'handm/languages'
get 'handm/services'
您可以發送部署屏幕截圖和您的heroku應用程序名稱 –
還可以發佈您的Heroku日誌(轉到您的應用程序,單擊查看日誌)。 – Gerry
我發生過這種情況,因爲我的應用程序不在git repo的根目錄中,我推送到了heroku –