tessad
tessad

Reputation: 1219

public activity gem on rails

I used public activity gem to track latest activities. It was working well on heroku but now has stopped working - the last thing I did was delete and edit a comment so this may have caused the problem. It is fine on localhost but in heroku I get the error

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

my activites controller is

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

and activities model is

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

Upvotes: 3

Views: 1525

Answers (1)

Nick Ginanto
Nick Ginanto

Reputation: 32120

you are missing a file called _update.html.erb in public_activity/comment so it doesn't know how to render it

Either recreate it and deploy or deploy what you have in localhost if it works

Upvotes: 6

Related Questions