简体   繁体   中英

Deploying Rails App on heroku Get path error

I am deploying my rails app on heroku and i was facing an issue.

I get this error

2015-04-28T05:10:29.159894+00:00 heroku[router]: at=info method=GET path="/welcome/index" host=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

My route file

Rails.application.routes.draw do
   get 'welcome/index', to: 'welcome#index'
  post 'welcome/index', to: 'welcome#create'
  get 'welcome/new', to: 'welcome#new'


end

First of all check you have created all templates for each method. Have you check your app works in local system in development mode? If it throw an error then first of all trace that error and fix. Then only try on production

Try to change your route file like this:

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

Let me know it works for you or not? If you face any problem then let me know. I will update my answer accordingly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM