views:

23

answers:

1

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.

A: 

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. 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.

$ git add app/views/pages/used_cars_south_wales.html.erb
$ git commit -m "some comment..."
$ git push heroku master
bjg
Hey thats the trick. I'm new to heroku and git, I committed the change and didn't add the file. Thanks so much.
lyntaff