3
目前,當我到我的heroku應用程序時出現錯誤,但是當我跳進日誌時,它不會返回任何錯誤。Heroku返回404,但在日誌中沒有錯誤
這就是它返回的結果。
2015-04-07T00:06:07.664850+00:00 heroku[router]: at=info method=GET path="/" host=popcorn.herokuapp.com request_id=d9e5961e-b819-4c5b-b979-b57db7dbb570 fwd="90.200.53.244" dyno=web.1 connect=2ms service=190ms status=500 bytes=1754
2015-04-07T00:06:08.060105+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=popcorn.herokuapp.com request_id=f5c27031-9e43-4d77-83b8-52337a3084f6 fwd="90.200.53.244" dyno=web.1 connect=3ms service=14ms status=404 bytes=1829
2015-04-07T00:08:09.761488+00:00 heroku[router]: at=info method=GET path="/" host=popcorn.herokuapp.com request_id=42778326-e39a-41e6-a5d2-428ad5eba96f fwd="90.200.53.244" dyno=web.1 connect=1ms service=35ms status=500 bytes=1754
的routes.rb
Rails.application.routes.draw do
devise_for :users
root "posts#index"
resources :posts
resources :categories do
resources :posts
end
get 'tags/:tag', to: 'posts#index', as: :tag
end
任何幫助將是輝煌!
感謝
當路由不可用時,您通常會得到404。可能性是您不會將根路由設置爲任何控制器操作。另外,我會建議在'config/production.rb'文件中增加'log_level'到'debug'並提交,重新部署到heroku。 – bsvin33t
@Vineeth我已將我的routes.rb添加到問題中。 – Jonathan
任何幫助將輝煌:) – Jonathan