我使用公共活动gem来跟踪最新活动。它在heroku上运行良好,但现在已停止工作 - 我做的最后一件事是删除并编辑注释,这可能导致问题。它在localhost上很好,但在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
我的活动控制器是
<% @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
答案 0 :(得分:6)
你错过_update.html.erb
中名为public_activity/comment
的文件,因此它不知道如何呈现它
重新创建它并部署或部署localhost中的内容(如果有效)