我正在heroku上部署我的rails应用程序,我遇到了一个问题。
我收到此错误
2015-04-28T05:10:29.159894 + 00:00 heroku [router]:at = info method = GET 路径=" /欢迎/索引"主机= still-dawn-6484.herokuapp.com request_id = 45bf4295-d7f0-4788-9f4d-be35cce41aa1 fwd =" 108.183.45.173" dyno = web.1 connect = 0ms service = 11ms status = 500 bytes = 1754
我的路线档案
Rails.application.routes.draw do
get 'welcome/index', to: 'welcome#index'
post 'welcome/index', to: 'welcome#create'
get 'welcome/new', to: 'welcome#new'
end
答案 0 :(得分:1)
首先检查您是否为每种方法创建了所有模板。您是否在development
模式下检查您的应用是否在本地系统中运行?如果它抛出一个错误,那么首先跟踪该错误并修复。然后只尝试production
尝试更改您的路线文件:
Rails.application.routes.draw do
root 'welcome#index' #to make it main page(default)
post '/welcomes', to: 'welcome#create'
get 'welcome/new', to: 'welcome#new'
end
让我知道它对你有用吗?如果您遇到任何问题,请告诉我。我会相应地更新我的答案。