gpt4 book ai didi

ruby-on-rails - rails 上的公共(public)事件 gem

转载 作者:行者123 更新时间:2023-12-04 06:23:59 25 4
gpt4 key购买 nike

我使用公共(public)事件 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

我的事件 Controller 是

<% @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

最佳答案

您在 public_activity/comment 中缺少一个名为 _update.html.erb 的文件,因此它不知道如何呈现它

要么重新创建它并部署,要么部署你在本地主机上的东西,如果它能工作的话

关于ruby-on-rails - rails 上的公共(public)事件 gem ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15874822/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com