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