0
votes

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
1
can you post your route file? I think you have not set root 'welcome#index' - Gagan Gami
sure i willl do it now gagan - user1010101
@GaganGami i have posted it - user1010101
It's saying status 500. Can you show your welcome#index code? Also, make sure you have ran your migrations - RAJ
Have you check by running rake routes? Is this working in your development mode properly? I don't think so it should work on development. Check you have created your template for each method. Generally Error 500 for ActionView::MissingTemplate - Gagan Gami

1 Answers

1
votes

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.