2010-07-30 195 views
1

我有一個'頁面'控制器與一些靜態頁面,而不是使用其餘方法(顯示,索引等)。(ActionView :: MissingTemplate)將應用程序部署到heroku時出錯

的靜態文件查看罰款我的本地計算機上,但與Heroku的部署時,我得到了以下錯誤:

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

任何人都得到了同樣的問題,知道的任何建議。

回答

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 
+0

嘿那就是訣竅。我是heroku和git的新手,我承諾進行更改並且不添加文件。非常感謝。 – lyntaff 2010-07-30 12:57:32

相關問題