2013-04-08 50 views
3

我使用公共活動寶石來追蹤最新活動。它在heroku上運行良好,但現在已停止工作 - 我所做的最後一件事是刪除並編輯註釋,因此可能導致此問題。這是在本地主機上正常,但在Heroku上出現錯誤鐵軌上的公共活動寶石

ActionView::Template::Error (Missing partial public_activity/comment/update with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :arb]}. Searched in: 
2013-04-08T01:46:41+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/activeadmin-0.5.1/app/views" 
2013-04-08T01:46:41+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.3/app/views" 
2013-04-08T01:46:41+00:00 app[web.1]:  3: <% @activities.each do |activity| %> 
2013-04-08T01:46:41+00:00 app[web.1]:): 
2013-04-08T01:46:41+00:00 app[web.1]:  4: <div class="activity"> 
2013-04-08T01:46:41+00:00 app[web.1]:  5:  <i><%= activity.owner.profile_name rescue 'System' %> </i> 
2013-04-08T01:46:41+00:00 app[web.1]:  6:  <%= render_activity activity %> 
2013-04-08T01:46:41+00:00 app[web.1]:  7: </div> 
2013-04-08T01:46:41+00:00 app[web.1]:  8: <% end %> 
2013-04-08T01:46:41+00:00 app[web.1]: app/views/activities/index.html.erb:6:in `block in _app_views_activities_index_html_erb__3948591612645283053_56035360' 
2013-04-08T01:46:41+00:00 app[web.1]: app/views/activities/index.html.erb:3:in `_app_views_activities_index_html_erb__3948591612645283053_56035360' 
2013-04-08T01:46:41+00:00 app[web.1]: 
2013-04-08T01:46:41+00:00 app[web.1]: * "/app/app/views" 
2013-04-08T01:46:41+00:00 app[web.1]: Completed 500 Internal Server Error in 234ms 
2013-04-08T01:46:41+00:00 app[web.1]: Processing by ActivitiesController#index as HTML 

我activites控制器

<% @activities.each do |activity| %> 
    <div class="activity"> 
     <i><%= activity.owner.profile_name rescue 'System' %> </i> 
     <%= render_activity activity %> 
    </div> 
<% end %> 

和活動模式是

def index 
     @activities = PublicActivity::Activity 
     .order("created_at desc") 
     .where(trackable_type: %w(Guideline Comment)) 
end 

回答

6

你缺少一個文件中public_activity/comment稱爲_update.html.erb所以它不知道如何渲染它

要麼重新創建它,並部署或部署你有本地主機,如果它工作

+0

完美謝謝。是的,我根本沒有更新文件,因爲用戶無法更新評論,所以當我在管理端自己編輯評論時,它引發了這個錯誤。現在排序,謝謝! – tessad 2013-04-08 10:09:51