我的应用程序在我的本地主机上完美运行,但是当我将它推送到 Heroku 时,我的主页给了我一条消息,上面写着“您要查找的页面不存在”。应用程序中的其他页面(不是全部,而是大多数)在 Heroku 上正确显示。这是运行的输出heroku run cat config/routes.rb
:
Running `cat config/routes.rb` attached to terminal... up, run.8019
SampleApp::Application.routes.draw do
resources :users
resources :sessions, only: [:new, :create, :destroy]
resources :relationships, only: [:create, :destroy]
resources :teams
resources :players
resources :matchups
root 'static_pages#home'
match '/signup', to: 'users#new', via: 'get'
match '/signin', to: 'sessions#new', via: 'get'
match '/signout', to: 'sessions#destroy', via: 'delete'
match '/help', to: 'static_pages#help', via: 'get'
match '/about', to: 'static_pages#about', via: 'get'
match '/contact', to: 'static_pages#contact', via: 'get'
match '/updatepts', to: 'static_pages#updatepts', via: 'get'
match '/findMatchup', to: 'static_pages#findMatchup', via: 'get'
另一个明显不显示的页面是matchups/:id
. 关于为什么这在本地显示没有问题但在 Heroku 上不起作用的任何想法?谢谢!
编辑:我正在运行带有 Ruby 2 的 Rails 4。