lyntaff
lyntaff

Reputation: 15

(ActionView::MissingTemplate) Error when deploying app to heroku

I have a 'pages' controller with some static pages instead of using the rest method (show, index etc).

The static files view fine on my local machine but when deploying with heroku I get the following error:

PagesController#used_cars_south_wales (ActionView::MissingTemplate) "Missing template pages/used_cars_south_wales.erb in view path app/views"

Anyone else get the same problem, any advice appreciated.

Upvotes: 1

Views: 1387

Answers (1)

bjg
bjg

Reputation: 7477

The error message says it all I think. Heroku Rails is looking for app/views/pages/used_cars_south_wales.html.erb but it's obviously not finding it. If it's working locally then that file does exist. That it's not working on Heroku suggests it has not been added and committed to the git repo before pushing your app.

$ git add app/views/pages/used_cars_south_wales.html.erb
$ git commit -m "some comment..."
$ git push heroku master

Upvotes: 2

Related Questions