Heroku 返回 404 但日志上没有错误

Jon*_*han 5 deployment ruby-on-rails heroku

目前,我在访问我的 heroku 应用程序时遇到错误,但是当我跳入日志时,它没有返回任何错误。

这就是它返回的内容。

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
Run Code Online (Sandbox Code Playgroud)

路由文件

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
Run Code Online (Sandbox Code Playgroud)

任何帮助都会很棒!

谢谢

小智 3

当您使用 Heroku 时,我希望您没有忘记在应用程序上运行迁移。

heroku run rake db:migrate