(ActionView :: MissingTemplate)将应用程序部署到heroku时出错

时间:2010-07-30 10:26:22

标签: ruby-on-rails heroku

我有一个带有一些静态页面的'pages'控制器,而不是使用rest方法(show,index等)。

静态文件在我的本地计算机上正常查看,但在使用heroku部署时出现以下错误:

  

PagesController #used_cars_south_wales(ActionView :: MissingTemplate)“视图路径应用/视图中缺少模板页面/ used_cars_south_wales.erb”

其他任何人都会遇到同样的问题,任何建议都会受到赞赏。

1 个答案:

答案 0 :(得分:2)

错误消息说明了我的全部。 Heroku Rails正在寻找app/views/pages/used_cars_south_wales.html.erb,但显然没有找到它。如果它在本地工作,那么该文件确实存在。它不适用于Heroku,表明在推送你的应用程序之前它还没有被添加到git repo中。

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